Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Instead of filtering Data from yesterday's date, is it possible to filter from the last 24 hours? I have a date column with hours mins and seconds and would like to filter/slice data by hour if possible.
Solved! Go to Solution.
Hi @Anonymous ,
We can use the following workaround to filter the last 24 hours in some visual:
1. create a table as slicer:
2. create a measure and use it in visual filter
Last24Hour = IF(SELECTEDVALUE('Show Last 24 Hours'[Show Last 24 Hours],FALSE()),IF(DATEDIFF(SELECTEDVALUE('Table'[Time]),NOW(),HOUR)<=24 && SELECTEDVALUE('Table'[Time]) <= NOW(),1,-1),1)
Best regards,
Hi @Anonymous ,
How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?
Best regards,
Hi @Anonymous ,
We can use the following workaround to filter the last 24 hours in some visual:
1. create a table as slicer:
2. create a measure and use it in visual filter
Last24Hour = IF(SELECTEDVALUE('Show Last 24 Hours'[Show Last 24 Hours],FALSE()),IF(DATEDIFF(SELECTEDVALUE('Table'[Time]),NOW(),HOUR)<=24 && SELECTEDVALUE('Table'[Time]) <= NOW(),1,-1),1)
Best regards,
The answer is "Probably" but the trickiness will be how real-time you would like it.
One method can be to add a "Last 24 hours" flag into your table (Yes/No Field), based on DateTime.LocalNow(). You could do data math to check if the datetime is between DateTime.LocalNow() and DateTime.LocalNow() minus 1 day. This will only show you "last 24 hours at the time of refresh". This might be what you want.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
90 | |
89 | |
79 | |
70 | |
68 |
User | Count |
---|---|
226 | |
129 | |
119 | |
84 | |
77 |