Forum Discussion
Creating dynamic sum subtotal in column function
Thanks Amy,
However it is still not my desired outcome.
The subtotal should be 810 while no slicer is selected, however when a user applies a filter it should create a sum of the seleceted.
The regular sum function reduces the number of row however, the value remains static at the 810. My request is that the subtotal becomes 600 in this case where item 2 and 3 is selected.
Best regards
Lasse
Where are those numbers coming from for the subtotal in the rows? Item 2, 285?
Is this a measure totals problem? If so, Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
- Anonymous7 years agoNot applicable
No, I used the function given by Amy:
Subtotal = CALCULATE(SUM('Table'[Sold]),FILTER(ALLSELECTED('Table'),'Table'[Items]=EARLIER('Table'[Items])))This what the data column looks like.The 285 is basically the sum of item 2 times 3 becasue it occurs three times.
- v-xicai7 years ago
Community Support
Hi Anonymous ,
When I use the formula above, the Subtotal will return the result 600 instead of 800. I am not sure what desired result would you want, could you please show your desired output screenshots for further analysis?
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous7 years agoNot applicable
Hi Amy,
This is my desired outcome:
When i filter to see 'Item 2' and 'Item 3' then i summerize in a subtotal.
Or 'Item 1' and 'Item 3'.
It is used to achive a dynamic sum the items should be divided with in the end.
Do you understand my desired outcome?
Best regads
Lasse