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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

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.

 

 

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

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.

vcgaomsft_0-1652774721129.png

Then you can calculate the daily sales.

Attached PBIX file for reference.

Best Regards,
Gao

Community Support Team

 

If 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

View solution in original post

3 REPLIES 3
v-cgao-msft
Community Support
Community Support

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.

vcgaomsft_0-1652774721129.png

Then you can calculate the daily sales.

Attached PBIX file for reference.

Best Regards,
Gao

Community Support Team

 

If 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

amitchandak
Super User
Super 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")

Anonymous
Not 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.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.