Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi Everyone,
I am using the Choropleth MAP of India Country. As, I have three levels of data i.e. State, District, and PIN. I want to implement the ABC classification(where [column] >= 80 then "Very High", [column] > 60, then "High", [column] >20 then "Medium", [column] < 20 then "Low").
There are the following conditions -
1. If the user is on State level, then it should show the classification on the basis of the state.
2. If the user is on the District level, then it should show the classification on the basis of the district.
3. If the user is on the PIN level, then it should show the classification on the basis of the PIN.
Currently, It is working fine for State level only.
So, if anyone has any idea, please suggest.
Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490.
Tough to provide a solution without sample data and expected output. That being said, see if this quick measure for Dynamic ABC classification helps:
This is a good example of where setting some VARs in your measure will help.
First create a measure that returns the the users level. Probably that measure will have a couple of nested IF() functions. This measure might be:
User_Level =
VAR state = SELECTEDVALUE(Map[State])
VAR district = SELECTEDVALUE(Map[District])
VAR PIN = SELECTEDVALUE(Map[PIN])
RETURN IF(NOT(ISBLANK(state)),"State",IF(NOT (ISBLANK(district)),"District","PIN")
Then in your measure to calculate the ABC categories can call that measure
VAR amount= SWITCH([FindUserAmount],"State",MAP[State Value],"District",MAP[District Value],"PIN",MAP[PIN Value])
RETURN IF(amount >= 80, "Very High", IF(amount > 60, "High", IF(amount > 20,"Medium","Low")))
I made up some field names and wrote the code without create a power bi file to check it in. So hopefully it will just be enough to give and idea of how to get started. If you need more help with the DAX please post a small sample power bi file and I'll send back a working example.
I'm a personal Power Bi Trainer I learn something every time I answer a question
The Golden Rules for Power BI
Help when you know. Ask when you don't!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!