Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
I'm using: direct query
I need to make a filter that shows me in graph and a table the records of the last 3 hours with respect to the current time.
Is it possible to do this.?
¡¡¡¡¡¡¡HELP!!!!!!!!!
Solved! Go to Solution.
Hi @jorgeaguirre,
There are a way and a workaround. Please try it out.
1. Use "Top N" in visual level filter if your data is always up to now.
2. Create a measure, then filter the targets. (Refresh is needed to get the latest time)
IfLast3 = VAR HourDiff = HOUR ( NOW () ) - HOUR ( MIN ( 'Table37'[Time] ) ) RETURN IF ( HourDiff >= 0 && HourDiff <= 3, 1, 0 )
Best Regards!
Dale
Hi @jorgeaguirre,
There are a way and a workaround. Please try it out.
1. Use "Top N" in visual level filter if your data is always up to now.
2. Create a measure, then filter the targets. (Refresh is needed to get the latest time)
IfLast3 = VAR HourDiff = HOUR ( NOW () ) - HOUR ( MIN ( 'Table37'[Time] ) ) RETURN IF ( HourDiff >= 0 && HourDiff <= 3, 1, 0 )
Best Regards!
Dale
Dale!
Thank you! I work well locally, but when I publish it I get different values.
local
published
Hi @jorgeaguirre,
How about now? It seems the dates are different from the two pictures.
Best Regards!
Dale
Your Office tenant probably has its time zone set differently from wherever your data is being stored, so the apparent time difference is different from what you expect. You'll have to find out what that time difference is and correct for it in your filter calculation.
Proud to be a Super User!
If you can't get into your company's Office admin panel, the quickest way would be to write a measure to check it and publish that.
Time Now = NOW()
Put that on a card visual and publish the report, see what it says and compare it to the local time on your data source.
Proud to be a Super User!
True. The report is being used in a different region from which the data is stored in the service. The local time is 6 hours behind the server.
So you can still use the HourDiff suggestion from @v-jiascu-msft; you'll just have to subtract 6 hours from it.
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
82 | |
81 | |
52 | |
39 | |
35 |
User | Count |
---|---|
94 | |
79 | |
51 | |
47 | |
47 |