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

IF with multiple arguments and AND argument

Hello 

I am trying to formulate a If statament with multiple arguments, but its always returning me 1. Following is the table and the colored green column is my intended result. 

Annotation 2020-04-03 094747.png

 

So its checks the review status and then compares whether Due date is finished with today (which is a measure today()).

following is the if condition i formulated and it always returned me 1

If('ROI'[Review status]<>"Closed (A)"||('ROI'[Review status]<>"Closed (B)"||('ROI'[Review status]<>"Closed (C)"||('ROI'[Review status]<>"Closed (D)"||('ROI'[Review status]<>"Closed (E)")||('ROI'[Review status]<>"Submitted") && 'ROI'[Due date].[Date]<'ROI'[Today],"1","0")
 
But it works perfetcly when i have just few arguments i.e If('ROI'[Review status]<>"Submitted") && 'ROI'[Due date].[Date]<'ROI'[Today],"1","0")
 
Thanks in advance
BB
1 ACCEPTED SOLUTION
dax
Community Support
Community Support

Hi @bishnu , 

You could add the condition in expresion like below to see whether it work or not

Measure = IF(MIN('Table'[name]) IN {"REA","REB", "REC"} && MIN('Table'[date])<TODAY(), 1,0)
Column = IF('Table'[name] IN {"REA","REB", "REC"} && 'Table'[date]<TODAY(), 1,0)

 

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@bishnu 

if(('ROI'[Review status]<>"Closed (A)"||'ROI'[Review status]<>"Closed (B)"||'ROI'[Review status]<>"Closed (C)"||'ROI'[Review status]<>"Closed (D)"||'ROI'[Review status]<>"Closed (E)"||'ROI'[Review status]<>"Submitted") && 'ROI'[Due date].[Date]<'ROI'[Today],"1","0")


Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Thanks @amitchandak 

But it dosent work, its always returning me 1

dax
Community Support
Community Support

Hi @bishnu , 

You also could try below codes

calculated column: Column = IF('Table'[name] IN {"REA","REB", "REC"}, 1,0)

Measure: Measure = IF(MIN('Table'[name]) IN {"REA","REB", "REC"}, 1,0) 

 You could refer to my sample for details.

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @dax

First check is for the status and It should also check the due date with current date and if due date has passed, then it will give me one 1, other wise 0.

dax
Community Support
Community Support

Hi @bishnu , 

You could add the condition in expresion like below to see whether it work or not

Measure = IF(MIN('Table'[name]) IN {"REA","REB", "REC"} && MIN('Table'[date])<TODAY(), 1,0)
Column = IF('Table'[name] IN {"REA","REB", "REC"} && 'Table'[date]<TODAY(), 1,0)

 

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!