Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi Team,
Below is my data.
Cust_ID | Priority | Country |
1234 | 1 | INDIA |
1234 | 2 | INDIA |
4567 | 3 | INDIA |
4567 | 1 | INDIA |
Country will be my filter and I want to create the pie chart where I want to show count of Cust_ID by priority but with business rule. For example: If user select INDIA from filter, then it should take max of priority by Cust_ID which is 2 and 3 respectively and pie chart show based on below data
Cust_ID | Priority |
1234 | 2 |
4567 | 3 |
Solved! Go to Solution.
Hi @VIPINGARG ,
Like this?
Please create a new measure.
Count of Id =
VAR _max_priority =
CALCULATE(MAX('Table'[Priority]),ALLEXCEPT('Table','Table'[Cust_ID]))
VAR _result =
CALCULATE(COUNT('Table'[Cust_ID]),'Table'[Priority]=_max_priority)
RETURN
_result
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
Hi @VIPINGARG ,
Like this?
Please create a new measure.
Count of Id =
VAR _max_priority =
CALCULATE(MAX('Table'[Priority]),ALLEXCEPT('Table','Table'[Cust_ID]))
VAR _result =
CALCULATE(COUNT('Table'[Cust_ID]),'Table'[Priority]=_max_priority)
RETURN
_result
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
@Greg_Deckler I can't use cust_ID as legend as I need to show it by Priority only and need to show the count of cust_IDs.
@VIPINGARG So put Cust_ID in Legend and this measure, Measure = MAX('Table'[Priority]) as Values?
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.