Forum Discussion
Time Filter Slicer
- 2 months ago
Hi Sharvari2102,
You should Convert your time column to an integer (minutes since midnight) and use the numeric range slicer (Between mode). This gives users two clean input boxes, exactly like the screenshot you shared, without scrolling or search workarounds.
Here's what you can do step by step:
Step 1 Create a calculated column or transform in Power Query:
Time As Minutes = Hour([TimeColumn]) * 60 + Minute([TimeColumn])
Step 2: Add a Numeric Range Slicer on Time As Minutes, set to Between.
Step 3: Adapt your measure to work with the integer range:
Records Outside Range =
VAR StartMin = MIN('Slicer'[Time As Minutes])
VAR EndMin = MAX('Slicer'[Time As Minutes])
RETURN
CALCULATE(
COUNTROWS('YourTable'),
'YourTable'[Time As Minutes] < StartMin
|| 'YourTable'[Time As Minutes] > EndMin
)
Step 4 (optional): format display labels using a helper measure so axis/tooltip shows HH:MM instead of raw integers:
Format Minutes =
VAR M = SELECTEDVALUE('YourTable'[Time As Minutes])
RETURN
FORMAT(TIME(INT(M/60), MOD(M,60), 0), "HH:MM")
Hope this helps! Don't forget to accept as solution and give a like in order to keep helping others.
Best regards,
Oussama (Data Consultant - Expert Fabric & Power BI)
Hi Sharvari2102,
Thank you for posting your query in the Microsoft Fabric Community Forum.
Could you please confirm if your issue has been resolved using the suggested approach? This will help other community members facing similar scenarios.
Thank you for being part of the Microsoft Fabric Community.