Forum Discussion
thurlowj
2 years agoNew Member
Total not displaying in Row
Hi! I think I'm missing something obvious but I have tried so many different measures and none of them have worked and honestly getting no where each time I look at it. I want to see the Total displa...
- 2 years ago
Workaround could be:
DCOH Mean = VAR IsTotal = NOT (HASONEVALUE('Table B'[Locid])) VAR SingleVal = CALCULATE ( GEOMEAN ( 'Table'[ DCOH ] ), FILTER ( 'Table', 'Table'[Locid] = SELECTEDVALUE ( 'Table B'[Locid] ) ) ) VAR TotalVal = GEOMEAN('Table'[DCOH]) RETURN IF(IsTotal, TotalVal, SingleVal)BUT I don't understand why you do it this way in the first place. Just make a relationship between Table 2[Locid] (1) to Table[Locid] (m) (1:m) and alter your measure to:
DCOH Mean = GEOMEAN ( 'Table'[ DCOH ] )
thurlowj
2 years agoNew Member
Thanks for your help so far, that makes sense. 'Table B' contains my Locid selections
lukiz84
Memorable Member
2 years agoWorkaround could be:
DCOH Mean =
VAR IsTotal = NOT (HASONEVALUE('Table B'[Locid]))
VAR SingleVal =
CALCULATE (
GEOMEAN ( 'Table'[ DCOH ] ),
FILTER ( 'Table', 'Table'[Locid] = SELECTEDVALUE ( 'Table B'[Locid] ) )
)
VAR TotalVal =
GEOMEAN('Table'[DCOH])
RETURN IF(IsTotal, TotalVal, SingleVal)
BUT I don't understand why you do it this way in the first place. Just make a relationship between Table 2[Locid] (1) to Table[Locid] (m) (1:m) and alter your measure to:
DCOH Mean =
GEOMEAN ( 'Table'[ DCOH ] )