Forum Discussion
Calcullate All/Filter
Hello,
I need to create a measure to calculate the % of grand total. Let me explain you what I mean
Product Amount Total Sales(Measure I need) % Grand Total (2nd Measure needed)
A 100 200
B 75 200
C 25 200
Total = 200
This data example is not filtered by any field. What I need is the "200" changes depending on the filters applied, so i can get the % total for every field (either by supervisor, country, department, etc.)
Thanks
3 Replies
- AnonymousNot applicable
Hi Anonymous
To get the grand total, you would do something like this:
Total Sales = Calculate( SUM('YourTable'[Amount]), ALL('YourTable') )Then, to get the % of the total, you can do:
% Grand Total = DIVIDE( SUM('YourTable'[Amount]), [Total Sales] )- AnonymousNot applicable
Anonymous Hey, i already tried that but what it gives me is the TOTAL amount of calls (in my case is around 100,000) So, it will divide the amount of calls per agent by the TOTAL 100,000 calls, and that's not what I need, what I need is to have that amount filtered by agent or sup or country, instead of the 100,000 i need for example the total calls per AGENT, idk if that makes sense
- v-lili6-msftCommunity Support
hi Anonymous
You need to adjust the formula by using ALLEXCEPT Function instead of ALL Function.
https://www.sqlbi.com/articles/using-allexcept-versus-all-and-values/
Regards,
Lin