Forum Discussion
Blake753
5 years agoHelper II
Add 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...
- 5 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
5 years agoSuper User
Usually 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'))
- Blake7535 years agoHelper II
Can you elaborate on this please? I'm not quite sure what you are saying.
- lbendlin5 years agoSuper 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.
- Blake7535 years agoHelper II
Can you put what you are saying in an example .pbix file and post that please?