cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jalaomar
Helper II
Helper II

How to return correct value for multiple IF statements

Hi all,

 

Anyone knows how I can fullfill my measure that I am trying to work as the following 

 

if  PVoT Days <= 0 then return 1 (true) else 0 (false)

if PVoT Days has Blank value then retun 0

if PVoT Days >= 1 then return 0 (false) 

 

In the screenshot you can see that my measure works for the 2 first statment, how can i add the 3rd statment (if PVoT is >= 1 then return 0)?

2021-09-29_11-14-00.png

1 ACCEPTED SOLUTION
Marik
Solution Supplier
Solution Supplier

@jalaomar Use SWITCH function:

SWITCH(TRUE(),

   ISBLANK([PVoT Days]),0,

   [PVoT Days]>=1,0,

   [PVoT Days]<=0,1,

   0)

View solution in original post

2 REPLIES 2
jalaomar
Helper II
Helper II

Hi @Marik, the measure is working perfectly 

Many thanks for the support! 🙂

Marik
Solution Supplier
Solution Supplier

@jalaomar Use SWITCH function:

SWITCH(TRUE(),

   ISBLANK([PVoT Days]),0,

   [PVoT Days]>=1,0,

   [PVoT Days]<=0,1,

   0)

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.