Pergunta
How to display the total average sales as a reference line on a bar chart showing the top N average sales in each subcategory?
How to display the total average sales as a reference line on a bar chart showing the top N average sales in each subcategory?
Use a FIXED LOD.
In this case, the FIXED LOD is processed simultaneously with the TOP N filter. The calculation results are not affected by dimension and measure filters due to the order of operations.1. Select Analysis > Create Calculated Field. Name the field Fixed and enter the following calculation then click OK:
{ FIXED : AVG([Sales]) }2. Drag Fixed to Detail on the Marks card.
{ EXCLUDE [Sub-Category] : AVG([Sales]) }