Forum Discussion
SUM with RELATED
In this sample table, I have factTable and uniqueTable.
Given the matrix view from factTable, I'm trying to get the value from uniqueTable.
However, given my current DAX, it's giving me wrong value, and I suspect it's summing the value from the uniqueTable Nth times that appears in the factTable
SUMX(factTable, RELATED(uniqueTable[Total]))
JustDavid it should be something like this:
Sum = SUMX ( SUMMARIZE ( 'Fact', 'Fact'[Region], 'Fact'[ID], 'Unique'[Total] ), [Total] )The other solution with MAXX will not work for the row total.
5 Replies
- ryan_mayu
Super User
it's not a good way of creating data modeling. your fact table is like a dim table but doesn't have the primary key column. What's more you don't have Q3FY25 B in your fact table.
what's more, I can't open the link you provided.
- AnonymousNot applicable
Hi JustDavid,
Thanks ryan_mayu and parry2k for Addressing the issue.
we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.Regards,
Vinay Pabbu- AnonymousNot applicable
Hi @JustDavid,
we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.Regards,
Vinay Pabbu- AnonymousNot applicable
Hi @JustDavid,
we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.Regards,
Vinay Pabbu