Forum Discussion
PivotTable Error with Relationships using Data Model
- Jan 21, 2019
Most probably for you data like in this model
rows selected as
What to do is to add one more column into main table with related fielld
and make Pivot Table on it
or simply land the table back into the sheet with DAX expression like
(Data->Existing Connections->Open Table 1, right click on it, Table->Edit DAX->select DAX).
See in attached
Hi Jan,
Thanks for answering. In this case, the relationship is ok, given that one record or the table1 could be related with one or more than one record of the table 2, and by the way, it is the Excel that makes that kind of relation.
- SergeiBaklanJan 21, 2019Diamond Contributor
Most probably for you data like in this model
rows selected as
What to do is to add one more column into main table with related fielld
and make Pivot Table on it
or simply land the table back into the sheet with DAX expression like
(Data->Existing Connections->Open Table 1, right click on it, Table->Edit DAX->select DAX).
See in attached
- Humberto_HerreraJan 22, 2019Copper Contributor
Thank you very much for your answer Sergei,
I did it by adding a calculated column (in the table of the data model), applying the RELATED function, and making the corresponding pivot table on it.
At the beginning, I thought it was enough with having both related tables (with correct data) and then creating the pivot table in order to arrange the fields. However, it didn't work. The question I still have is why does this happen? Is it an Excel bug? I hope in the next Excel version it isn't necessary to add related fields :)
Thanks again.
- JKPieterseJan 21, 2019Silver ContributorWithout (a sample of) your data this is very hard to answer.
- Humberto_HerreraJan 22, 2019Copper Contributor
Hi Jan,
Thanks for your time.
I attached the data in the initial post.