Forum Discussion

JinjiNoDie's avatar
JinjiNoDie
New Member
1 year ago
Solved

List missing information in new table

I have two tables with a M:M relationship. Whats the best way to determine if something is missing from the second table when comparing it to the first table?     
  • rohit1991's avatar
    1 year ago

    To determine if something is missing in the second table compared to the first table in Power BI:

    1. Create Relationships: Establish a relationship between the two tables based on the common fields (e.g., Report Number and Item Number).

    2. Create a New Table: Use a DAX formula like the following to identify missing items:
      MissingItems =
      EXCEPT(
      SELECTCOLUMNS('FirstTable', "Report Number", 'FirstTable'[Report Number], "Item Number", 'FirstTable'[Item Number]),
      SELECTCOLUMNS('SecondTable', "Report Number", 'SecondTable'[Report Number], "Item Number", 'SecondTable'[Item Number]))

    3. Visualize the Output: Use a table visualization to display the MissingItems table, showing the Report Numbers and Item Numbers missing from the second table.

    4. This will directly list all missing combinations of report and item numbers.