Forum Discussion
Heinrich
Post Partisan
1 year agoSlicer for Weekdays and Hours
Hello Hope you are doing well. I would like to do 2 slicers. 1. Weekday: Monday to Sunday 2. Hours 1. I copied the Date Column and managed to have only the Name of the Weekdays but when I drag t...
- 1 year ago
Don’t copy columns — create proper dimension tables:
Weekdays (Mon–Sun):
DimWeekday =
DATATABLE("Weekday", STRING,
{{"Monday"},{"Tuesday"},{"Wednesday"},{"Thursday"},{"Friday"},{"Saturday"},{"Sunday"}})
Hours (0–23):DimHour =
ADDCOLUMNS(GENERATESERIES(0,23,1),"HourText",FORMAT(TIME([Value],0,0),"hh:00"))
Relate them to your fact table and use as slicers. This way slicers show unique weekdays & hours. - 1 year ago
Create a proper calculated column for weekday:
Weekday = FORMAT('Table'[Date], "dddd")To sort weekdays in correct order (Mon–Sun), add another column
Weekday No = WEEKDAY('Table'[Date],2)In the model, select Weekday column → “Sort by Column” → choose Weekday No
If your time column is DateTime, create:
Hour = HOUR('Table'[Time])Hour Label = FORMAT('Table'[Time], "HH:00")💡 If this helped, please give Kudos 👍 or mark it as a Solution ✅.
Best regards,
Kedar
🌐 Connect on LinkedIn
Heinrich
Post Partisan
1 year agoHello Kedar_Pande
Hello Shahid12523
Thank you very much for your answers.
Have a great day
Juan