Forum Discussion
NotebookEnjoyer
Advocate II
4 months agoUSERELATIONSHIP problems with n:m-relationship
Hello everyone, I have an arrangement as follows: Therein, the following measure unfortunately yields blank values: Sum by inactive Relationship = SUMX( VALUES('Fact_2'[Key_F2]), ...
- 4 months ago
Try this:
Sum F1 by F2 := CALCULATE( SUM('Fact_1'[Value_F1]), TREATAS( VALUES('Fact_2'[Key_D1]), 'Fact_1'[Key_D1] ), REMOVEFILTERS('Map1') )
johnt75
Super User
4 months agoNot sure if this will work but you could try
Sum by inactive Relationship =
VAR _Keys =
CALCULATETABLE (
VALUES ( 'Fact_2'[Key_F2] ),
USERELATIONSHIP ( 'Dim_1'[Key_D1], 'Fact_2'[Key_D1] )
)
VAR Result =
SUMX ( _Keys, CALCULATE ( SUM ( 'Fact_1'[Value_F1] ) ) )
RETURN
Result
NotebookEnjoyer
Advocate II
4 months agoDoesn't work, unfortunately. Could it be that the calculated "_Keys"-table does not have the original relationships anymore?