Forum Discussion

JonS79's avatar
JonS79
Copper Contributor
Feb 16, 2024

Having trouble with data model relationships

Hello,

I am trying to build a data dashboard for a work analysis project. I've had no trouble using power query to load the data, and building a power pivot data model. At first I struggled because the two main data sources (labeled SIOP and EDI in the picture) have many repeats of the same part number (common identifier). I solved this issue by creating a master key (with no repeats) - and this allowed me to create pivot tables of the data. I'm coming across one issue I can't solve: the tables all have a relationship by part #, but when I try to create a slicer for "Manufacturer" from the SIOP table to sort the data in the EDI table - the pivot table refuses to respond. It won't sort. I would have thought that because all the tables are linked by part # - that I can use the manufacturer field. Any ideas? Help is much appreciated, thanks!

 

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    JonS79 Could you share some data to better demonstrate your model? One of the reasons why you can't slice EDI data on Manufacturer from the SIOP table is because that data element can't filter 'up stream'. 

     

    And then I wonder why you have 'Manufacturer' in the the SIOP table. Does that mean that a component may have multiple manufacturers? If that's not the case, move that field to the 'Key' table. Than slicing will not be a problem.

     

    If,  on the other hand, a component may have multiple manufacturers how would you want to slice the data from the EDI table? Good if you could give some examples of the expected results.

    • JonS79's avatar
      JonS79
      Copper Contributor

      Riny_van_Eekelen thanks for your answer. 

      the SIOP data contains many fields - it’s a future forecast of demand by part number by plant with a total for each month. The same part number may appear 15 times. There is only one part number per manufacturer.

       

      The EDI is a plant demand by part number file - it has monthly demand by part number by plant, but no manufacturer data. just like the SIOP file, the same part number can appear 15 times. 

      both of these files are generated by external teams - and my team needs to do monthly analysis and comparison of demand and forecast by part number, tech density, and supplier. 

      the reason I don’t have manufacturer in the SIOP file is I don’t generate it. I generated the master key as I’m new to learning data models and excel and figured out quickly you need a clean master key with no reoccurrences to align data sources. 

      would you mind explaining what you mean by can’t filter upstream? I had thought if i had a clean correlation by part number between tables any field could be correlated and that is my misunderstanding of how the data model works I guess! Thanks so much. 

      answering on my phone so I’ll try to add data examples in a bit. 

      • Riny_van_Eekelen's avatar
        Riny_van_Eekelen
        Platinum Contributor

        JonS79 OK, I'll wait for your examples.

         

        You wrote: "There is only one part number per manufacturer."

         

        My question was "are there multiple manufacturers for a part number?" One manufacturer may of course supply multiple part numbers. That's no problem.

         

         

         

Resources