Last Modified Date: 20 Jul 2023
Environment
Tableau DesktopAnswer
Placing INDEX() on Detail on the Marks Card should resolve the issue.To reproduce and try the solution, please use the attached workbook Stacked Bar Charts-running sum.twbx and start from Sheet 2. Problem. To view the results, see the Solution Sheet in the same workbook where the field F is the running sum of all previous categories.
- Start with the "2. Problem" worksheet.
- Create a new calculated field called "INDEX" and use the following formula:
INDEX()
- Drag "INDEX" to Detail on the Marks Card.
- Right-click on "INDEX" on the Marks Card and select 'Edit Table Calculation'
- Select the 'Compute using:' drop down menu.
- Click Specific Dimension and move Product above Category in the partition.
- Both Product and Category should be ticked.
- In the section At the level, choose: "Product"
- Click OK.
Additional Information
The "INDEX" field must be on Detail because it will create domain padding specific to the stacked bar chart. In text tables, it is very clear how domain padding is computed, but because of the way stacked bar charts are laid out, it is impossible to see how the domain padding is actually working. We do know the way "INDEX" is being addressed/partitioned affects the final running total of Value.Note: the above workaround is not needed when the running sum is computed along a dimension that is a "date" type.
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Continue Searching
Knowledge Base
Community
Product Help
Training and Tutorials