Forum Discussion
luxpbi
Helper V
8 years agoProblem with total row in matrix
Hi all, I have a Data that looks similar to this: Type Amount Number Average Price A 1.000 10 100 B 2.000 ...
Zubair_Muhammad
Community Champion
8 years ago
Give this a shot
Number =
IF (
HASONEFILTER ( [Type] ),
DIVIDE ( [Amount], [Average Price], BLANK () ),
SUMX (
ALLSELECTED ( TABLENAME ),
DIVIDE ( [Amount], [Average Price], BLANK () )
)
)luxpbi
Helper V
8 years agoZubair_Muhammad thanks for your answer but it doesn't work even with the [Type] table visual.
And I think that your formula would work only with a table visual with the dimension [Type] and not with others.
- luxpbi8 years ago
Helper V
Anyone wit more ideas? It's really urgent for me.
If I don't find a solution I'll have to do a lot of different meassures, one for each dimension. And it's not efficient at all...- Anonymous8 years agoNot applicable
HI luxpbi,
Maybe you can try to use row count as calculate condition :
Number = IF ( COUNTROWS(Table)=1, DIVIDE ( [Amount], [Average Price], BLANK () ), SUMX ( ALLSELECTED ( Table ), DIVIDE ( [Amount], [Average Price], BLANK () ) ) )Regards,
Xiaoxin Sheng