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.
Hello! I am trying to write a filter expression that tells the report to only look at the previous day. This is using a date column, and not a date table. I am having a very difficult time getting the correct expression so that the report will run. If I remove the filter expression, it runs fine, but I cannot seem to get the correct expression, so I get an error message when running the report.
Any help would be greatly appreciated!
Solved! Go to Solution.
Hi @rcb0325 ,
Do you want to filter the records in the table 'fact ProductionRouteView' which the value of the field [EndDateTime] is equal to the day before today? Please update the filter expression as below and check if the report can run successfully...
[EndDateTime] = DateAdd(DateInterval.Day, -1, Today())
The below screenshots are testing results(I run it with Power BI Report Builder)...
Best Regards
Hi @rcb0325 ,
Please update the filter expression circled in red as below:
=DateAdd(DateInterval.Day, -1, Today()) |
You can find the details in the following official documentation.
Expression examples in Power BI Report Builder
If the above one is not working, please provide some sample data involved in paginated report and the error message when you run the report. Thank you.
Best Regards
Here is the error message when I try to execute the query, using the updated filter expression:
Below is some sample data from the executed query without the EndDateTime filter:
Hi @rcb0325 ,
Do you want to filter the records in the table 'fact ProductionRouteView' which the value of the field [EndDateTime] is equal to the day before today? Please update the filter expression as below and check if the report can run successfully...
[EndDateTime] = DateAdd(DateInterval.Day, -1, Today())
The below screenshots are testing results(I run it with Power BI Report Builder)...
Best Regards
Had the same issue. Solution works perfect. Thanks!
That did it! thank you so much. May I ask why we it had to be done as a field filter and not a query filter?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |