Here’s how I would handle this from a data modeling perspective:
- delete both the Work Order Per Day and Last 12 Hours tables - they are almost completely duplicative of other tables already in the model, and all the info can be pulled from other existing tables
- in your transactions table, split Posting Date Time into two separate fields - a Post Date and a Post Time field, via Power Query split by delimiter function. Make sure the resulting columns are set to type Date and type Time respectively
- mark your Dates table as a date table (critical for any time intelligence analysis)
- connect the Dates table to the Transactions table in a unidirectional 1:M relationship
- add a Time table to your model, @Melissa provides the M code for an excellent one here:
- connect your Time table to your Transactions table in a unidirectional 1:M relationship with Posting Time
Presto! Optimized Star Schema data model , that should support any type of time intelligence analysis you want to do.
I hope this is helpful.
- Brian