Forum Discussion
Wrong Total
I have already used this calculation. It seems working fine.
But i do not want to use values function here, as it will restrict the output to provide correct results for the table that i have used with values function.
What i want is, it should give correct result with any dimensional attribute, which has a relationship with this table from which amount is used.
Hi AbhishekPandey ,
With above measure using VALUES(TableName) instead of VALUES(TableName[Column]), whichever dimension being added into table visual, Total rows returns correct result. You could test with name and solution or any other field.
Best regards,
Yuliana Gu
- AbhishekPandey7 years agoHelper IThanks, i will give it a try.
- AbhishekPandey7 years agoHelper I
Hi v-yulgu-msft,
I have used the same calculation as shared, below are some snips. Could you please help me in this.
Here is a link to the PBIX, with some sample data.
https://www.dropbox.com/s/pfm564aq1lo3tgl/Total%20issue.pbix?dl=0
If you see in the first screenshot, it seems working fine with one dimension only, i.e Sname, the column name wrong total is sum(amount)/count(sid), the total of this calculation is incorrect,
The column correct total gives the correct output and the expression used is
SUMX(VALUES(SID[Sname]),CALCULATE(SUM(Final[Amount]))/CALCULATE(COUNT(Final[Sid])))Now in the second screenshot, it gives incorrect total, when another dimension Pname is dragged along with existing dimension Sname.
Thanks,
Abhishek Pandey
- AbhishekPandey7 years agoHelper I
Hi,
Any update on this.