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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

SQL CASE statement equivalent to in DAX

hi , I m developing a powerbi matrix report and my row data is a look up column and I have to group  some values into one value ..

example - IF the column has values AB or BC or
CZ then display as NEW, IF values are FE of ZS then OLD Else NORMAL

In SQL I can easily write CASE statement . My data source is sales force . can anyone plz give me the DAX query to achieve my requirement so tat I can then use tat column in my matrix rows ?

 

1 ACCEPTED SOLUTION
selimovd
Super User
Super User

Hello @Anonymous ,

 

you can realize that in DAX with the Switch function and a TRUE() statement.

Check the following article:

DAX - The Diabolical Genius of “SWITCH TRUE”

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up
👍


Best regards
Denis

Blog: WhatTheFact.bi

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

SWITCH TRUE worked like a magic to me.

selimovd
Super User
Super User

Hello @Anonymous ,

 

you can realize that in DAX with the Switch function and a TRUE() statement.

Check the following article:

DAX - The Diabolical Genius of “SWITCH TRUE”

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up
👍


Best regards
Denis

Blog: WhatTheFact.bi

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.