A client calculates the percent of total sales for a particular region compared to all regions.
Which calculation will fix the automatic recalculation on the % of total field?
To correctly calculate the percent of total sales for a particular region compared to all regions, and to ensure that the calculation does not get inadvertently recalculated with each region filter application, the recommended calculation is:
{FIXED [Region]: sum([Sales])}: This part of the formula computes the sum of sales for each region, regardless of any filters applied to the view. It uses a Level of Detail expression to fix the sum of sales to each region, ensuring that filtering by regions won't affect the calculated value.
SUM([Sales]): This part computes the total sum of sales across all regions and is recalculated dynamically based on the filters applied to other parts of the dashboard or worksheet.
Combining the two parts: By dividing the fixed regional sales by the total sales, we get the proportion of sales for each region as compared to the total. This calculation ensures that while the denominator adjusts according to filters, the numerator remains fixed for each region, accurately reflecting the sales percentage without being affected by the region filter directly.
Reference This calculation follows Tableau's best practices for using Level of Detail expressions to manage computation granularity in the presence of dashboard filters, as outlined in the Tableau User Guide and official Tableau training materials.
Ilda
1 months agoAdela
1 months agoRana
7 days agoGail
8 days agoTequila
1 months agoDalene
2 months agoDetra
2 months agoKimbery
8 days agoHarris
13 days agoKattie
1 months agoAn
2 months agoDalene
2 months agoCherry
2 months agoWalton
12 days agoDorothy
13 days agoGlenn
15 days agoVivienne
17 days agoMarva
18 days agoAshlee
1 months agoValentine
1 months agoIsadora
1 months ago