Both of the tables have more than one record for order_no in each table which makes it to have many to many relationship. I tried building a bridge table but that did not help.
I need assistance with connecting these two tables. Can someone please help?
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.
Hi @gkhokher, did the response provided by @BrianJ help you solve your query? If not, how far did you get and what kind of help you need further? If yes, kindly mark as solution the answer that solved your query. Thanks!
The work order table has OperationStartDate and OperationEndDate and quantities. Those quantities are for the whole time period (OperationStartDate and OperatoinEndDate). But I need to show last 12 hours quantities. So, I need to split those quantites for that 12 hours . This is why I had to create WorkOrderPerDay table as I split the rows based on the date range.
But now I need to get the fields from WorkOrderPerDay table and show it in table visual that has data from multiple tables. If I add the field from WorkOrderPerDay, all the records from the table visual disappears as this table does not have relationship with Work Order Table.
Please let me know if more info is needed.