Forum Discussion

Royden Carneiro's avatar
Royden Carneiro
Copper Contributor
Dec 07, 2018

Issues with Pivot table: Data Model is not applying relationship

Hi there,

 

What I'm trying to do is build a pivot table that utilizes a data model. Unfortunately, for some reason, the relationships described in the data model are not being applied to the pivot table. I'm not sure what I'm doing wrong. The table structure is very simple. 

 

 

My Tables:

 Data Relationship

 Pivot Table

My Expected Results are: 

 James Corbin: BA

Jim Jam: PM

Lara Croft: Java, BA, PM

Row Low: Java, .NET

 

 

What am I doing wrong? Thanks in advance.

    • Royden Carneiro's avatar
      Royden Carneiro
      Copper Contributor

      Thank you Sergi, I took a look at your solution. Does that mean Pivot tables don't work with the data models. I was trying to stay away from a marged table as I have a large data set and would like to leverage data relationships and pivot tables.

      • SergeiBaklan's avatar
        SergeiBaklan
        MVP

        Royden, Pivot Table works fine with data model, that's the main method to show data model results.

         

        In your case in one-to-many relationships build pivoting  from many to one. To your middle table in Power View add name and role from the related table

        and pivot it

        Please see attached

Resources