The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello experts,
I'm having stuggle on creating a time range. I know that natively PBI does not support a slider for Time format values (which would be very simple and practical for many uses), so I have to come up with a workaround.
I have tried other workarounds such as converting the time values into decimal numbers, but this leads to the slider taking numbers above 60; also i've tried by converting the time values into whole numbers, by taking the hours as values and leaving out the minutes, such as 11:10 would be 11, etc. But the problem with this approach is that if i filter 10 and 11 it filters from 10:00 to 11:59.
So the ideal solution, given the circumstances, is to create two slicers, one with a Start time and other with End Time.
I currently have one Time column. The user will select a single value on the Start Time slicer, and on the End Time will show the times greater than the value selected in the Start Time slicer, so the user will select a single value. This two selections would give the time range that would be applied to the graphs.
I'm not familiar with this workaround so it would be very helpful for the community and myself if there is a solution for this.
Thanks in advance!
Hi @mebg123 ,
I made simple samples and you can check the results below:
Measure = var _min = MIN('Table 2'[Date])
var _max = MAX('Table 2'[Date])
RETURN CALCULATE(SUM('Table'[Value]),FILTER('Table',[Date]>=_min&&[Date]<=_max))
An attachment for your reference. Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
@Wilson_ I've also created a time table, but what i need is to be able to select a Start Time and an End Time and show all values between those two times. I believe this has to be done by creating measures, but i'm not capable of doing it.
Can you please share a mockup of your data model pbix file? That would be the most convenient way to take a further look at your issue. (If you're not sure how to do this, please check the pinned thread in this forum.)
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)
Proud to be a Super User! | |
mebg123,
It sounds like you're looking to create a time dimension table (like you would have for dates). If so, check this link out: https://radacad.com/script-for-creating-time-table-in-power-bi-with-hours-minutes-and-seconds-bucket...
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)
Proud to be a Super User! | |
Have you considered using the Filter pane instead? It is designed to handle these scenarios.
Yes, but this doesn't solve the issue. When creating two filter panes (one for start time and other for end time) and filter a time in the first filter pane, you are only able to filter that value in the second filter.
What i need is when filtering in the first pane, I can be able to filter the times greater than the value selected on the first filter
That doesn't sound correct. You can have a "between" filter on a single column.
Exactly, but the "between" filter only accepts dates and numbers, not time values.
I need to be able to recreate that "between" filter for time values
I may be unaware of some concepts of PBI. What I'm trying to create is that exact filtering option but in the slicer object. It appears as the Between style like shown below:
The thing is that it only supports date and numeric values, it doesn't support time values. That is why i was trying to make a workaraound to create one Start time slicer and other End Time slicer and inbetween a measure that takes those two selected values as the time range
We have already established that this is not currently possible in a slicer. I have shown you the alternative using the Filter Pane.
If this is important to you please consider voting for an existing idea or raising a new one at https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41
User | Count |
---|---|
59 | |
57 | |
55 | |
50 | |
32 |
User | Count |
---|---|
171 | |
87 | |
70 | |
46 | |
45 |