Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be 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

Reply
venkat_chaganti
New Member

undefined

Hi guys, I am looking for a time slicer where i can select time in between format similar to date slicer. Please respond back if you guys have any idea how to do it.

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Thanks for the reply from @AmiraBedh and @amitchandak , please allow me to provide another insight: 

Hi  @venkat_chaganti ,

I created some data:

vyangliumsft_0-1718867506510.png

Here are the steps you can follow:

1. Create calculated table.

Date = GENERATESERIES (TIME (0, 0, 0), TIME (23, 59, 59), TIME (0, 15, 0))

vyangliumsft_1-1718867506512.png

2. Create measure.

Flag =
var _mintime=MINX(ALLSELECTED('Date'),[Value])
var _maxtime=MAXX(ALLSELECTED('Date'),[Value])
var _time=TIME(
    HOUR(MAX('Table'[Date])),MINUTE(MAX('Table'[Date])),SECOND(MAX('Table'[Date])))
return
IF(
    _time>=_mintime&&_time<=_maxtime,1,0)

3. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_2-1718867543851.png

4. Result:

vyangliumsft_3-1718867543855.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

6 REPLIES 6
v-yangliu-msft
Community Support
Community Support

Thanks for the reply from @AmiraBedh and @amitchandak , please allow me to provide another insight: 

Hi  @venkat_chaganti ,

I created some data:

vyangliumsft_0-1718867506510.png

Here are the steps you can follow:

1. Create calculated table.

Date = GENERATESERIES (TIME (0, 0, 0), TIME (23, 59, 59), TIME (0, 15, 0))

vyangliumsft_1-1718867506512.png

2. Create measure.

Flag =
var _mintime=MINX(ALLSELECTED('Date'),[Value])
var _maxtime=MAXX(ALLSELECTED('Date'),[Value])
var _time=TIME(
    HOUR(MAX('Table'[Date])),MINUTE(MAX('Table'[Date])),SECOND(MAX('Table'[Date])))
return
IF(
    _time>=_mintime&&_time<=_maxtime,1,0)

3. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_2-1718867543851.png

4. Result:

vyangliumsft_3-1718867543855.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Hi, thanks for the solution we have done it simalrly but we didn't create any dax fuction when we have done. I have manually entred the data in transform data by creating a new table. we will try with solution you have provided.
Thank you for taking your time to answer my questions.

AmiraBedh
Most Valuable Professional
Most Valuable Professional

Create a new table in Power BI that contains the time intervals you want to slice :

 

TimeTable =
ADDCOLUMNS (
GENERATE (
CALENDAR (DATE(2021, 1, 1), DATE(2021, 1, 1)),
GENERATESERIES (TIME (0, 0, 0), TIME (23, 59, 59), TIME (0, 15, 0))
),
"Time", [Date] + [Value]
)

Create a relationship between your main data table and the new time table based on the time columns and add the time column from your new time table to the slicer visual in your report. Then change the slicer settings to "Between" to allow users to select a range of time.

More links :

https://learn.microsoft.com/en-us/power-bi/create-reports/slicer-filter-relative-time

https://community.fabric.microsoft.com/t5/Desktop/Slider-Slicer-that-Includes-Time-Not-just-Date/td-...

 


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

we have already tried by inserting the timelines that we require .
I want to create is a time slicer wit 24 hr format where i can select from one particular toother. for example i want to display the data from 11:00 am to 11:30 am like this

amitchandak
Super User
Super User

@venkat_chaganti , You have timeline slicer

https://appsource.microsoft.com/en-us/product/power-bi-visuals/wa104380786?tab=overview

 

Or the workaround using 2 slicers

 

Select data between months - https://youtu.be/nEt7dT3Tfv4

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

we have already used timeline slicer what i excatly want to create is a time slicer wit 24 hr format where i can select from one particular toother. for example i want to display the data from 11:00 am to 11:30 am like this. 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.