Forum Discussion
Time based slicer
Hello everyone,
My report consists of 10 pages of various bar charts and line charts. The main issue with them is to sync the dates slicer. I have a separate page where the date can be controlled, but the problem is it does not control the datetime. e.g. I need my data exactly between 01:00 AM today and 01:00AM of next day across all of the pages. What do you think can be done?
3 Replies
- amitchandakSuper User
Anonymous , see if time slicer in Apr-2020 can help
https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-april-2020-feature-summary/
- IceyCommunity Support
Hi Anonymous ,
Based on my research, it is not supported to fulfill your requirements directly in Power BI currently. You can post your idea on Power BI Ideas. It is a place for customers to provide feedback about Power BI.
Please check if Relative time slicer could meet your requirements.
If it couldn't meet your requirements, it is suggested to create a DateTime table like so:
DateTime = VAR TimeTable = GENERATESERIES ( 0, 23, 1 ) VAR TimeTable_ = SELECTCOLUMNS ( TimeTable, "Time", FORMAT ( [Value], "00" ) & ":00" ) VAR DateTable = CALENDAR ( MIN ( 'Table'[DateTime] ), MAX ( 'Table'[DateTime] ) ) RETURN ADDCOLUMNS ( CROSSJOIN ( DateTable, TimeTable_ ), "DateTime", [Date] & " " & [Time] )Then, change data type:
[Date]: text -> Date
[Time]: text -> Time
[DateTime]: text -> Date/time
After creating relationships, you can use columns from 'DateTime' table as filters.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- IceyCommunity Support
Hi Anonymous ,
Can the workarounds above meet your requirements?
Best Regards,
Icey