Forum Discussion
Custom Timing in the Heatmap
Hi PBIXER,
I want to make a Heatmap where Timing of the Working hours is from the 10 am to 3 am in a 24 hours cycle.
and then the 3 am to 10 am in Close Store for the club .
Cracking my head as technically after 12 am the day changes and the Sales Value and Order Details would fetch or read in the Day cycle.
- Anonymous4 years ago
Hi Anonymous ,
If each day's orders are during business hours, you can create this calculated column in the fact table to determine which day the order belongs to.
Date = SWITCH( TRUE(), TIMEVALUE('FactSales'[Date_Time])>=TIME(10,0,0),DATEVALUE('FactSales'[Date_Time]), TIMEVALUE('FactSales'[Date_Time])<=TIME(3,0,0),DATEVALUE('FactSales'[Date_Time])-1 )Creating relationships with calendar tables.
Then you can calculate the daily sales.
Attached PBIX file for reference.
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
3 Replies
- amitchandakSuper User
Anonymous , If you have datetime field create a shift
If( timevalue([DateTime]) >= time(10,0,0) && timevalue([DateTime]) < time(15,0,0) , "Shift1" , "Shift2")
- AnonymousNot applicable
Hi Amit,
Thank You for the Swift replay Amit,
Can you please show a sample example or maybe a similar PBIX file regarding this unable to grasp it.
- AnonymousNot applicable
Hi Anonymous ,
If each day's orders are during business hours, you can create this calculated column in the fact table to determine which day the order belongs to.
Date = SWITCH( TRUE(), TIMEVALUE('FactSales'[Date_Time])>=TIME(10,0,0),DATEVALUE('FactSales'[Date_Time]), TIMEVALUE('FactSales'[Date_Time])<=TIME(3,0,0),DATEVALUE('FactSales'[Date_Time])-1 )Creating relationships with calendar tables.
Then you can calculate the daily sales.
Attached PBIX file for reference.
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data