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
Sathvik123
Helper V
Helper V

if condition dax logic

Hello All,

 

I have dax logic below and I need to check one condition before it and if that has the value 'AMRS' then 0 else I need to execute below logic

 

if region='AMRS' then 0 else my below condition should execute.

Not sure how to write it..

 

Could any one please help

 

 

KPIChatTime = SWITCH(TRUE(),
[Chatmins] <=20, 5,
 [Chatmins] <=25  , 4,
 [Chatmins] <=27, 3,
 [Chatmins]  <=30, 2,
1)
1 ACCEPTED SOLUTION
Anonymous
Not applicable

You could just nest that whole thing in an IF() statement. Like, basically what you wrote:

 

IF( region='"AMRS", 0,

SWITCH(TRUE(),
[Chatmins] <=205,
 [Chatmins] <=25  , 4,
 [Chatmins] <=273,
 [Chatmins]  <=302,
1)
)

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

You could just nest that whole thing in an IF() statement. Like, basically what you wrote:

 

IF( region='"AMRS", 0,

SWITCH(TRUE(),
[Chatmins] <=205,
 [Chatmins] <=25  , 4,
 [Chatmins] <=273,
 [Chatmins]  <=302,
1)
)

 

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.