Forum Discussion
kaushik_asv
6 years agoFrequent Visitor
Dates - Shift times
Hello all, We run 2 shifts each day. Blue shift from 6.00 AM - 4.59 PM and Red shift runs from 5.00 PM - 3.59 AM. Looking to make a bar graph with Daily output on Y-axis on and Date field on X...
- 6 years ago
The following formula in a new column kaushik_asv will look at the time and if it is before 4am (3:59:59 am or earlier) will roll it back a day.
if DateTime.Time([End Shift]) < #time(4,0,0) then Date.AddDays(DateTime.Date([End Shift]), -1) else DateTime.Date([End Shift])If you need more help, please provide sample data per the links below, and expected results.
How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum
edhans
6 years agoCommunity Champion
The following formula in a new column kaushik_asv will look at the time and if it is before 4am (3:59:59 am or earlier) will roll it back a day.
if DateTime.Time([End Shift]) < #time(4,0,0) then
Date.AddDays(DateTime.Date([End Shift]), -1)
else DateTime.Date([End Shift])
If you need more help, please provide sample data per the links below, and expected results.
How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum