Forum Discussion
SUMMARIZE using column from another table
- 7 years ago
Anonymous
If that other table with Asset column is on the side of the relationship, then you can simply add it as GROUPING Column
= SUMMARIZE ( 'Visibility Data - All Regions', 'Visibility Data - All Regions'[Region], 'Visibility Data - All Regions'[Group], 'Visibility Data - All Regions'[Category], 'Visibility Data - All Regions'[Sub Category], OtherTableName[AssetColumn], "Revised Spend (USD)", SUM ( 'Visibility Data - All Regions'[Revised Spend (USD)] ) )
Anonymous
Could you share your file?
Hi Zubair,
Afraid I cannot as the data is very sensitive client data.
I have a main fact table containing the Region, Category, and Spend, as well as Cost Centre, I then have a seprate mapping table to map the Cost Centres to Assets. The same aggregation works fine in a front end chart not sure why I am getting this error when doing it in DAX.
Thanks,
TG
- v-jiascu-msft7 years ago
Microsoft Employee
Hi Anonymous,
Is the column in the ONE side of the relationship? If so, you can add it in summarize without any errors. Can you share a DUMMY sample that can reproduce the issue?
Best Regards,
Dale- Anonymous7 years agoNot applicable
Hi v-jiascu-msft,
Ah, I actually cleaned up my data model yesterday as I was previously using the new Many-to-Many relationship option for just one of the tables (the one I needed to get the extra column from!).
Trying the same code Zubair_Muhammad suggested yeterday has worked perfectly! Is there a reason why this won't work on the MANY side?
Thank you both for you help.
TG
- v-jiascu-msft7 years ago
Microsoft Employee
Hi Anonymous,
As we can see from the definition on this site, SUMMARIZE returns totals over a set of groups. So what can we expect the totals of one-side from the many-side?
I'm glad you solved the issue.
Best Regards,
Dale