Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Suppose you have a table called Sales with columns for Region, Product, and Revenue.
You need to create a measure that categorizes the Revenue based on the Region using the following criteria:
If the Region is "North America" or "Europe", categorize the Revenue as "Developed Markets".
If the Region is "Asia" or "South America", categorize the Revenue as "Emerging Markets".
If the Region is anything else, categorize the Revenue as "Other Markets".
hope you can provide alternate result?
Solved! Go to Solution.
Hi @Maha_0221
@Ashish_Mathur @AntrikshSharma Thank you very much for your prompt reply. Allow me to offer a different approach here.
@Maha_0221 For your question, here is the method I provided:
Here's some dummy data
“Sales”
You can create a measure. By calling a variable and making an if judgment.
Measure =
VAR _REGION = SELECTEDVALUE('Sales'[region])
RETURN
IF(
_REGION in {"North America", "Europe"},
"Developed Narkets",
IF(
_REGION in {"Asia", "South America"},
"Emerging Markets",
"Other Markets"))
Using variables can better help you minimize the impact on performance.
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Maha_0221
@Ashish_Mathur @AntrikshSharma Thank you very much for your prompt reply. Allow me to offer a different approach here.
@Maha_0221 For your question, here is the method I provided:
Here's some dummy data
“Sales”
You can create a measure. By calling a variable and making an if judgment.
Measure =
VAR _REGION = SELECTEDVALUE('Sales'[region])
RETURN
IF(
_REGION in {"North America", "Europe"},
"Developed Narkets",
IF(
_REGION in {"Asia", "South America"},
"Emerging Markets",
"Other Markets"))
Using variables can better help you minimize the impact on performance.
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
If you insist on a measure, then try this one
Measure = if(hasonevalue(Data[Region]),if(min(Data[Region])="North America"||min(Data[Region])="Europe","Developed Markets",if(min(Data[Region])="Asia"||min(Data[Region])="South America","Emerging Markets","Other")),blank())
Hope this helps.
You can create another table that has region and category and either merge them or use a relationship, but what is the issue in creating a calculated column with SWITCH?
report performance issue
Create a calculated column not a measure
this was asked in interview so he want best answer for this question
Categorize_Revenue= switch(allselected(sales(region),{"North America","Europe"},"Developed Markets", {"Asia" or "South america"},"Emerging markets",other markets))
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.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |