Forum Discussion
Blake753
Helper II
6 years agoAdd in average line with filtering
Here's the link where they answered part of the question I am asking: https://community.powerbi.com/t5/Desktop/How-to-calculate-an-average-line-in-the-Line-Chart/td-p/232371 What I am looking f...
- 6 years ago
Hi Blake753 ,
Or try this.
Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lbendlin
Super User
6 years agoUsually what you do is show your measure for a selected value, say
Selected = Divide([#DR],[#OP])
And then you add the measure for the average across all values regardless of selection
All = CALCULATE(DIVIDE([#DR],[#OP]),all('Fact Table'))
- Blake7536 years ago
Helper II
Can you elaborate on this please? I'm not quite sure what you are saying.
- lbendlin6 years ago
Super User
When you want to show a particular value AND you want to show the average across all values then you need to modify the filter context to remove your selected filter. That's what the "ALL('Fact Table')" part does in the CALCULATE() statement.
- Blake7536 years ago
Helper II
Can you put what you are saying in an example .pbix file and post that please?