Creating Many to Many Relationship

@gkhokher ,

Here’s how I would handle this from a data modeling perspective:

  1. 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
  2. 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
  3. mark your Dates table as a date table (critical for any time intelligence analysis)
  4. connect the Dates table to the Transactions table in a unidirectional 1:M relationship
  5. add a Time table to your model, @Melissa provides the M code for an excellent one here:
  1. 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