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
apuente2011
New Member

OR Statement for 2 dates

I am trying to limit records in the data that i am pulling to only records within the last 7 days based on two different dates. I can do this in SQL but not sure where in Power BI. In SQL i would likely use something like select * where date1 > currentdate-7 or date 2 > currentdate-7

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Use this formula :

 

Flag = IF(Table1[Date1]=TODAY()-7 ||Table1[Date2]=TODAY()-7, "1","0" )

 

 

Then add this Flag in the visual filter and filter for values "1" .

Thanks

Raj

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Use this formula :

 

Flag = IF(Table1[Date1]=TODAY()-7 ||Table1[Date2]=TODAY()-7, "1","0" )

 

 

Then add this Flag in the visual filter and filter for values "1" .

Thanks

Raj

Thank You. This Worked, just needed to add the > sign

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.