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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
vkandala
Frequent Visitor

DAX syntax

DAX Post 1.PNG

 

Please, I need some help.

 

Thanks

1 ACCEPTED SOLUTION
vkandala
Frequent Visitor

Hi 

 

I 've tried using 

 

 = IF(OR(OR(OR(OR(OR(OR(OR(OR('Car Data'[car]= "BMW",'Car Data'[car]= "Audi"),'Car Data'[car]= "Jaguar"),'Car Data'[car]= "Mercedes-Benz"),'Car Data'[car]= "Bentley" ),'Car Data'[car]= "Aston Martin"),'Car Data'[car]= "Rolls-Royce"),'Car Data'[car]= "Lamborghini"),'Car Data'[car]= "Ferrari,"),"Luxury","General")

 

and this worked!!

 

Thanks all for your workaround.

View solution in original post

5 REPLIES 5
vkandala
Frequent Visitor

Hi 

 

I 've tried using 

 

 = IF(OR(OR(OR(OR(OR(OR(OR(OR('Car Data'[car]= "BMW",'Car Data'[car]= "Audi"),'Car Data'[car]= "Jaguar"),'Car Data'[car]= "Mercedes-Benz"),'Car Data'[car]= "Bentley" ),'Car Data'[car]= "Aston Martin"),'Car Data'[car]= "Rolls-Royce"),'Car Data'[car]= "Lamborghini"),'Car Data'[car]= "Ferrari,"),"Luxury","General")

 

and this worked!!

 

Thanks all for your workaround.

v-shex-msft
Community Support
Community Support

Hi @vkandala,

 

Based on your screenshots, you can refer to below formula to check the segment of car column.

 

Calculated column: if count of current brand which exist in table is greater than 5, it is a general brand, otherwise it is a luxury brand.

 

Result = IF(COUNTAX(FILTER(ALL(Table),[Car]=EARLIER(Table[Car])),[Car])>5,"General","Luxury")

 

Notice: you can modify the bold number to switch the rare condition.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
dilumd
Solution Supplier
Solution Supplier

You can use "IF" and "OR" function to achieve the same result. Give me some sample date to help you with this?

vkandala
Frequent Visitor

Thanks, Dilmund for the reply.

 

I know we can do in the query editor. but can we achieve the same using a DAX syntax in the data view itself?

 

Thanks.

dilumd
Solution Supplier
Solution Supplier

Use a conditional column.

 

Capture.JPG

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors