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
HelloPowerBi
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
Anonymous
Not applicable

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
Anonymous
Not applicable

Hi @HelloPowerBi

 

Use , instead of ||.

 

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

 

Thanks

Raj

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

Anonymous
Not applicable

Hi

 

Try this.

 

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

 

Thanks

Raj

works thanks raj!

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.