Skip to main content
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
reendzz98
Helper I
Helper I

Switch statement

reendzz98_1-1652838382257.png

 

I want to create another column - Tier in my dashboard and below is the switch statement that I have queried:

tier_testing = SWITCH(
OFFICE[Sales] > 500, "Tier 1", 
OFFICE[Sales] >= 300 && SMS_TBL_MeSSP_AQIR_Fact_Infotech_Financials[Total Sales Measure] < 500, "Tier 2",
OFFICE[Total Sales Measure] >= 200 && OFFICE[Sales] < 300, "Tier 3",
OFFICE[Total Sales Measure] >=0 && OFFICE[Sales] < 200, "Tier 4")

The problem is that, whan I insert this measure in to the table, it cant read, and I think most probably because I didnt include the currency RM in my DAX. Anyone can help me to resolve this problem? I want to know how to include the currency in my DAX query.

1 ACCEPTED SOLUTION
reendzz98
Helper I
Helper I

@tamerj1 Thank you for your respond.  I have figured out the way to do it using multiple IF statement

View solution in original post

8 REPLIES 8
tamerj1
Super User
Super User

Hi @reendzz98 

please change OFFICE[Sales] to SUM(OFFICE[Sales]). The rest I belive are measures so there should be no problem. 

Hi @tamerj1 

thank you for your respond. I forgot to mention that [Sales] is actually a measure result from another measure. Does that affect my switch statement?

What results are you getting?can you share a screenshot?

reendzz98_0-1652844475876.png

this is the name of the table and column that i actually used and as I add SUM, the red line appears 

@reendzz98 
I mean the original results before adding SUM. Of course you cannot sum a measure

I couldnt display anything from the first time i did the switch statement. I tried using if statement, it did work but I can only display one of the tiers. 

reendzz98_0-1652845294060.png

tier_testing1 = IF(SMS_TBL_MeSSP_AQIR_Fact_Infotech_Financials[Total Sales Measure] >= 60000000, "Tier 1")
Anonymous
Not applicable

Hi @reendzz98 

Please try nested if statement.

 

Regards,

Ashfiya

reendzz98
Helper I
Helper I

@tamerj1 Thank you for your respond.  I have figured out the way to do it using multiple IF statement

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (25)