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
2 months agoAdela
2 months agoRana
20 days agoGail
21 days agoTequila
1 months agoDalene
2 months agoDetra
2 months agoKimbery
21 days agoHarris
26 days agoKattie
2 months agoAn
2 months agoDalene
2 months agoCherry
3 months agoWalton
25 days agoDorothy
26 days agoGlenn
28 days agoVivienne
1 months agoMarva
1 months agoAshlee
2 months agoValentine
2 months agoIsadora
2 months ago