Forum Discussion
How to calculate total Sum in Matrix visual with complex calculation?
- 3 years ago
Hi OliTFD check out my blog post on this (I had a similar case where I wanted to sum quantities per productid , I am pretty sure you will find it useful). It is based on the SUM() OVER PARTITION BY of SQL , I think you can also use the same logic for your COUNT https://www.iipowerblog.com/post/sum-over-partition-by-in-powerbi
amitchandak , AverageX is not the solution, the calculation is a little bit more complex, see below
Anonymous Thanks, this part is not the main problem, but thanks for the advise. To get the problem clearer, I try to explain the calculation with the image below:
It is a kind of three-steps-calculation:
- compare the count to the total for country
- multiply this with the level
- sum up this results for the country
The red part is where I am lost ;-). This needs to be the _HAND_CALCULATE-Part.
For the overall total ("Gesamt") it will be more or less the same, just changing step 1 to "compare to total for group".