cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
HelloPowerBi Frequent Visitor
Frequent Visitor

Help with IF OR

Hi there,

 

I am having difficulties with this formula 

Is Store Closed1 =
IF(OR([Close Date Measure1]=0||(LASTDATE(Week[Date])>[Close Date Measure1]),1,0))

 

Baiscally i am trying to show that either the store closed date is blank or that the last date of the week is bigger than the closed date, it shld show up as 1. 

 

Currently it is showing this error message Too many arguments were passed to the OR function. The maximum argument count for the function is 2

 

Could someone help me with this?? thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
rajendran Super Contributor
Super Contributor

Re: Help with IF OR

Hi

 

Try this.

 

IF( [Close Date Measure1]=0 || LASTDATE(Week[Date])>[Close Date Measure1],1,0)

 

Thanks

Raj

View solution in original post

4 REPLIES 4
rajendran Super Contributor
Super Contributor

Re: Help with IF OR

Hi @HelloPowerBi

 

Use , instead of ||.

 

IF(OR([Close Date Measure1]=0,(LASTDATE(Week[Date])>[Close Date Measure1]),1,0))

 

Thanks

Raj

HelloPowerBi Frequent Visitor
Frequent Visitor

Re: Help with IF OR

Hi Raj,

 

It doesnt seem to work! 

 

Pasted this

 

Is Store Closed1 =
IF(OR([Close Date Measure1]=0,(LASTDATE(Week[Date])>[Close Date Measure1]),1,0))

 

Still getting the same error message

 

Too many arguments were passed to the OR function. The maximum argument count for the function is 2

rajendran Super Contributor
Super Contributor

Re: Help with IF OR

Hi

 

Try this.

 

IF( [Close Date Measure1]=0 || LASTDATE(Week[Date])>[Close Date Measure1],1,0)

 

Thanks

Raj

View solution in original post

Highlighted
HelloPowerBi Frequent Visitor
Frequent Visitor

Re: Help with IF OR

works thanks raj!

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 96 members 1,270 guests
Please welcome our newest community members: