Forum Discussion
Incorrect Total - Context Filter - YTD Values
Hello,
I am banging my head with in-correct totals again. I tried HASONEVALUE, SUMX, SUMMARIZE etc. with no avail.
Example:
New Hires * Avg. Salary Variance for Executive is 375* (-12,226) = (-4584,584)
Total should be summation of these 5 rows: - $1,87,21096
but I am getting 12,043*(-7284).
I have attempted few formulas: You can search in this file with keyword "Harsh". but none of them are working.
https://drive.google.com/file/d/1MzfnfMxHUn7AeWdfx5eBo8_SKcsux1B3/view?usp=sharing
Thanks,
EZ
Hi Anonymous ,
According to your description, I created a sample, and here is my solution. SUMX function does help.
When using SUMX function, arithmetic expressions perform operations in the context of rows and each row returns a value.
SUMX remembers the values returned by each row and finally adds up all the values to sum up.
Create a measure:
Measure = SUMX ( 'New Hires', 'New Hires'[New Hires] * 'New Hires'[Var. New Hires Avg. Salary] )Final Output:
I attach my sample below for your reference.
Best Regards,
Community Support Team _ xiaosunIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- amitchandakSuper User
Anonymous ,
Sumx(Values(Table[Manager Level]), Calculate([New Hires] * [Avg. Salary Variance for Executive]))
Refer:
- v-xiaosun-msftCommunity Support
Hi Anonymous ,
According to your description, I created a sample, and here is my solution. SUMX function does help.
When using SUMX function, arithmetic expressions perform operations in the context of rows and each row returns a value.
SUMX remembers the values returned by each row and finally adds up all the values to sum up.
Create a measure:
Measure = SUMX ( 'New Hires', 'New Hires'[New Hires] * 'New Hires'[Var. New Hires Avg. Salary] )Final Output:
I attach my sample below for your reference.
Best Regards,
Community Support Team _ xiaosunIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.