March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi Team,
I would like to display last 24 hours of data on my axis out of last 2 days of data which I have in my query. But I can see only 12 AM today until now data.
Please see attached data and output (screenshots).
Expected Output would be, if its 2 PM now (06/11 - 2 PM ) then it should display, data between (06/10 - 2 PM) and (06/11 - 2PM).
I tried changing the Type from Continuous to Categorical. But my data has minute to minute data, so it shows every minute data.
My requirement is to see overview data, like 12 PM, 6 PM, 12 AM, 6 AM, 12 PM on x-axis for last 24 hours data.
Solved! Go to Solution.
Hi @c5966
You may use Date column in the data as x-axis.Then use the below Date measure in visual level filter and set it is 1 or is not blank like this post.
Reference:https://www.sqlbi.com/articles/applying-a-measure-filter-in-power-bi/
Regards,
Hi @c5966
You may try to create a measure to filter the visual.
Reference:https://community.powerbi.com/t5/Desktop/Showing-only-the-last-3-hours/td-p/210783
Measure = VAR hourdiff = DATEDIFF ( MAX ( Table2[DateTime] ), NOW (), HOUR ) RETURN IF ( hourdiff >= 24, 1 )
Regards,
Hi,
Thank you for your response.
APpreciate your help.
I did try to create a measure as you said, but I am not able to add that measure to the Axis for line graph. Axis is not accepting the Date measure.
Can you help me with that?
Thank you.
Hi @c5966
You may use Date column in the data as x-axis.Then use the below Date measure in visual level filter and set it is 1 or is not blank like this post.
Reference:https://www.sqlbi.com/articles/applying-a-measure-filter-in-power-bi/
Regards,
Thank you for your response.
I can still see 12 hours of data after adding the measure in the visual level filter.
I would like to see last 24 hours of data, instead of 12 hours or 18 hours.
Appreciate your help.
Thanks
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
85 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |