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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

How to get this expression in DAX?

How can I convert following SQL measure in DAX?

if [A]=[B] then 'TRUE'
ELSEIF [B]='All' then 'TRUE' END

1 ACCEPTED SOLUTION
Aditya_Meshram
Solution Supplier
Solution Supplier

Hi @Anonymous , you can get this by 

IF([A] = [B],TRUE(),IF([B] = 'All',TRUE(),BLANK()))

View solution in original post

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi  @Anonymous ,

If you want to create a new column ,you could use the following dax:

Column = IF('Table'[A]='Table'[B]||'Table'[B]="All",TRUE(),BLANK())

And if you want to create  a  measure ,you could try the following dax:

Measure = IF(MAX('Table'[A])=MAX('Table'[B])||MAX('Table'[B])="All",TRUE(),BLANK())

Final you will get :

vluwangmsft_0-1626144703769.png

 

 

Wish it is helpful for you!

 

Best Regards

Lucien

Aditya_Meshram
Solution Supplier
Solution Supplier

Hi @Anonymous , you can get this by 

IF([A] = [B],TRUE(),IF([B] = 'All',TRUE(),BLANK()))

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.