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

HelloPowerBi Frequent Visitor
Frequent Visitor

Re: Help with IF OR

works thanks raj!

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 110 members 1,559 guests
Please welcome our newest community members: