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
mmcarthur
Frequent Visitor

Yesterday Filter Won't Work in Power Bi Report Builder

I recently made a Paginated Report from Tables I had in a Power BI Report. Both of my tables have a Yesterday filter applied to them based on their respective date field. When I converted this report to make it a paginated report I copied my query using performance analyzer and built my paginated reports through that query. My question is, will the yesterday date filter code created from the copied query update each day to where it's actually yesterday's date? Or will I need to change this line of code from the query to a code that's something along the line of TODAY()-1? If I need to rewrite the code can I get help on what that would look like? Everything I try brings back an error. This is the line of code I question: 

VAR __DS0FilterTable2 =
FILTER(
KEEPFILTERS(VALUES('GLDS Merge'[CompletedDate])),
AND(
'GLDS Merge'[CompletedDate] >= DATE(2022, 8, 9),
'GLDS Merge'[CompletedDate] < DATE(2022, 8, 10)
)
)

1 ACCEPTED SOLUTION
mmcarthur
Frequent Visitor

I found the solution! I was missing a parenthesis before my TODAY()-1 function causing a syntax error. The correct code is (TODAY()-1)

View solution in original post

1 REPLY 1
mmcarthur
Frequent Visitor

I found the solution! I was missing a parenthesis before my TODAY()-1 function causing a syntax error. The correct code is (TODAY()-1)

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.