Howdy Power BI community,
First time PB user alert! Guys/Girls I need some help with date time slicers used in dashboard creation. Actually, I’m not even sure if this is the best way for me to query the data.
I’m working with our onsite SQL server that stores data from the fleet management system for our mining trucks and equipment.
For every haul from loader to dumping we are given the following:
- Cycle start time
- Cycle end time
- Payload
- Etc, etc
So from the start/end cycle time info I can use simple formulas to look at total payloads for each loading unit and can slice the data by: year, month, date. The problem is when I need to slice data by shifts.
Our shifts run as follows (example dates only):
- 1/09/16 6:15:00 am à 1/09/16 6:15:00 pm = day shift
- 1/09/16 6:15:00 pm à 1/09/16 6:15:00 am = night shift
The problem is with the last 6 hours of night shift, due to it falling in the next day.
Using a series of convoluted and messy formulas I have gotten…nowhere.
I have read on the PB forums that by creating the following data in a datetable that I can link it back to my truck cycle data to slice by adjusted date/shift ranges? The datetable creates an hourly-block for every day giving me 24 blocks which I can then use formulas to tweek to create the adjusted shift names.
It would also allow me to create a report that looks at hourly production of the loading units...which I will need to do later also.
The issues I’m having:
- I’m seriously lost and not 100% sure I know what I’m doing
- I don’t know how to relate this new table back to my cycle time date to allow it to be ‘sliced’ by the adjusted shift
- Will it even work or am I better of using some sort of formula to adjust the shift time in the cycle time table?
- Is any of what I said even possible or is there another way that you can recommend that may be more efficient?
I appreciate any time you can spare to help me with this.
Cheers,
Heath