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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

All possible combinations of DAX command

Dear community members,

 

I have the following DAX command: 

IF(MIN(Prijsbeleid[Contract vanaf]) > MIN(Prijsbeleid[Prijs vanaf]) && MIN(Prijsbeleid[Contract vanaf]) > MIN(Datum[Datum]) && MAX(Prijsbeleid[Contract tot]) < MAX(Prijsbeleid[Prijs tot]) && MAX(Prijsbeleid[Prijs tot]) < MAX(Datum[Datum]),1,0)
 
Now, I want to have all possible combinations of this DAX command in one DAX command, such as:
IF(MIN(Prijsbeleid[Contract vanaf]) > MIN(Prijsbeleid[Prijs vanaf]) && MIN(Prijsbeleid[Contract vanaf]) > MIN(Datum[Datum]) && MAX(Prijsbeleid[Contract tot]) < MAX(Prijsbeleid[Prijs tot]) && MAX(Prijsbeleid[Prijs tot]) < MAX(Datum[Datum]),1,
IF(MIN(Prijsbeleid[Contract vanaf]) <= MIN(Prijsbeleid[Prijs vanaf]) && MIN(Prijsbeleid[Contract vanaf]) > MIN(Datum[Datum]) && MAX(Prijsbeleid[Contract tot]) < MAX(Prijsbeleid[Prijs tot]) && MAX(Prijsbeleid[Prijs tot]) < MAX(Datum[Datum]),2,
IF(MIN(Prijsbeleid[Contract vanaf]) > MIN(Prijsbeleid[Prijs vanaf]) && MIN(Prijsbeleid[Contract vanaf]) <= MIN(Datum[Datum]) && MAX(Prijsbeleid[Contract tot]) < MAX(Prijsbeleid[Prijs tot]) && MAX(Prijsbeleid[Prijs tot]) < MAX(Datum[Datum]),3,etc..........)))
 
Is there a way to do this without writing it all down manually?
1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , I doubt any automatic way. But use Switch

https://www.youtube.com/watch?v=gelJWktlR80

Switch( True(),

<condition> , <result>,

<condition> , <result>,

else

)

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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

Top Solution Authors