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.
I have the table that looks like below.
out of 5, I should see only 3 as part of the last 12 hours (let's say its 9:07 CST AM now )
I'm planning to use it as a filter to show only the last 12 hours entries based on the current(now) time.
so A B C will only show on the table/matrix. Need help
Ticket | CreatedDateTime | Status |
A | 5/6/2021 8:47 | New |
B | 5/6/2021 0:38 | New |
C | 5/6/2021 0:34 | New |
D | 5/5/2021 3:37 | New |
E | 5/5/2021 0:04 | New |
Solved! Go to Solution.
Hi, @v_mark
IF you want to work for the last 3 or 6 hours, You can change the number of Measure, if it's 3 hours, it's 3/24, if it's 6 hours, it's 6/24. as follows:
Flag = IF(MAX([CreatedDateTime])<=NOW()&&MAX([CreatedDateTime])>=NOW()-3/24,1,0)
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v_mark ,
You could create a measure by the following formula:
Flag = IF(MAX([CreatedDateTime])<=NOW()&&MAX([CreatedDateTime])>=NOW()-0.5,1,0)
Then apply Flag measure to Filter:
If you only want to see the top 3 records within 12 hours, you can add another filter:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Will the same approach works for the last 3 or 6 hrs?
Hi, @v_mark
IF you want to work for the last 3 or 6 hours, You can change the number of Measure, if it's 3 hours, it's 3/24, if it's 6 hours, it's 6/24. as follows:
Flag = IF(MAX([CreatedDateTime])<=NOW()&&MAX([CreatedDateTime])>=NOW()-3/24,1,0)
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Can you share a screen capture of what it looks like when you apply this filter? Also, check what it looks in pbi service when you publish it. If its showing different like mentioned in this post
Solved: Date calculating differently on desktop and web du... - Microsoft Power BI Community
then you will need to convert it to specific timezone first (CST in your case) and then apply a filter on it.
Regards,
Dheeraj
Here's what it looks like in the pbi service. My current time is 11:12 AM
Hi @v_mark ,
You can try using "Relative time" option on your date slicer.
After that select "Last" and enter 12 and then select "Hours".
This will filter your data in the table visual. Also, if you don't want to use the slicer, you can use the same concept by dragging your "Date" field to Page Filters or Visual Filters and then select Relative Time from the options.
Please mark it as solution and give kudos if it helps you.
Thanks,
Dheeraj
My issue right there is it follows are completely different timezone. I'm in CST, I was hoping to see a time 12 hours from my time. Let's say currently it's 10:53AM I should see something like
10:53AM - 10:53PM
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |