Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi! I am asking for somebody's advice.
How can I write a measure which gives me the overall average of the whole category to which the selected customer belongs?
Select month, Customer1, it has categoy BV, so I need the average value for the whole category not just for Customer1 within the selected month.
Month | Code | Customer | Vendor category | Value |
JULY | 111 | Customer1 | BV | 45.40% |
JULY | 112 | Customer2 | BV | 58.80% |
JULY | 113 | Customer3 | BV | 46.70% |
JULY | 114 | Customer4 | AC | 23.50% |
JULY | 115 | Customer5 | AC | 60.00% |
JULY | 116 | Customer6 | AC | 60.80% |
AUGUST | 111 | Customer1 | BV | 58.50% |
AUGUST | 112 | Customer2 | BV | 60.30% |
AUGUST | 113 | Customer3 | BV | 65.70% |
AUGUST | 114 | Customer4 | AC | 50.70% |
AUGUST | 115 | Customer5 | AC | 62.30% |
AUGUST | 116 | Customer6 | AC | 34.50% |
Selected Month AUG
Selected customer Customer1
Value 58.50%
Category Average 61.50%
Category average is total Customer1,2,3 for BV category in this case
I tried it many ways but still not working....I would like to use it in a gauge chart as target.
Thank you in advance!
Solved! Go to Solution.
Hi @MBog
Please create a new measure:
Category Average =
CALCULATE(
AVERAGE('Table'[Value]),
FILTER(
ALL('Table'),
'Table'[Vendor category] IN VALUES('Table'[Vendor category])
&& 'Table'[Month] IN VALUES('Table'[Month])
)
)
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Thanks Gao, this is exactly what I need. I was overcomplicated the measure, but yours helped!
Hi @MBog
Please create a new measure:
Category Average =
CALCULATE(
AVERAGE('Table'[Value]),
FILTER(
ALL('Table'),
'Table'[Vendor category] IN VALUES('Table'[Vendor category])
&& 'Table'[Month] IN VALUES('Table'[Month])
)
)
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum