Forum Discussion
Summerizing multiple tables as one based on multiple criteria and dynamic by date
I have multiple tables botyh containing columns with matching items. My goal is to create a dynamic summary of the data in each table using different an similar criteria. One table is a record or reported production in pieces (gross produced and gross loss) from a manufacturing facility. The second is report of downtime by type and reason for the same facility. Each table contains matching column informaiton including the operation reported against, work order, date, etc. The downtime table contains unique data as it relates to time down by type and reason. The production table contains specific data as it relates to pieces produced and value in variance to a budget.
My goal is to summerize and merge the data so I can show a summary of each operation, its total value in variance to budget, and the top 1 downtime reason for the production type based on the total hours reported down. The data then needs to be dynamic based on a date slicer so each day the total variance along with top downtime reason can be viewed. If there is a tie between multiple reasons ideally i would like to concentate the two however choosing the first is an acceptable output as well.
I have tried to do this several ways and have been unseccessful. I have tried creating new tables with summerize columns, creating relationships, merging queries, appending queries, etc. but cannot seem to get the output I am looking for. I am open to doing this in any way possible, through a visual, DAX, or through power query.
Additional notes: Data is on a schewduled refresh and will continue to grow, all sources in actual PBIX are dataflows from power bi.
Here are examples of each table and the desired output.
Downtime
Production table
Summary/output table