Forum Discussion
Iamnotarobot
6 years agoRegular Visitor
add average per category lines to chart
Hi everyone, Is there a way to add average lines per category to line charts? I know you can add constant lines and an average line, but I want the average per category. Can you put in a meas...
- 6 years ago
Hi Iamnotarobot ,
What about this?
Avg Bob = CALCULATE ( AVERAGE ( 'Table'[Quantity] ), FILTER ( ALL ( 'Table' ), 'Table'[Name] = "Bob" ) )Avg John = CALCULATE ( AVERAGE ( 'Table'[Quantity] ), FILTER ( ALL ( 'Table' ), 'Table'[Name] = "John" ) )Avg Mia = CALCULATE ( AVERAGE ( 'Table'[Quantity] ), FILTER ( ALL ( 'Table' ), 'Table'[Name] = "Mia" ) )Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Icey
Community Support
6 years agoHi Iamnotarobot ,
What about this?
Avg Bob =
CALCULATE (
AVERAGE ( 'Table'[Quantity] ),
FILTER ( ALL ( 'Table' ), 'Table'[Name] = "Bob" )
)
Avg John =
CALCULATE (
AVERAGE ( 'Table'[Quantity] ),
FILTER ( ALL ( 'Table' ), 'Table'[Name] = "John" )
)
Avg Mia =
CALCULATE (
AVERAGE ( 'Table'[Quantity] ),
FILTER ( ALL ( 'Table' ), 'Table'[Name] = "Mia" )
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.