Forum Discussion
Raj007
5 years agoHelper III
Creating a column to display slicer selected value calculation
Hi, I have a requirement where I have 2 columns Country and Users, %GT Users is ahieved by showing value as percentage of grand total, as shown below. Also, there is a slicer slug. My r...
- 5 years ago
Hi Raj007 ,
Please refer to:
Measure = VAR _COUNTRY = CALCULATE(SUM('Table'[Users]),ALLEXCEPT('Table','Table'[Country])) VAR _TOTAL = CALCULATE(SUM('Table'[Users]),ALL('Table')) VAR PERCENTAGE_ = DIVIDE(_COUNTRY,_TOTAL) VAR CURRENT_ = DIVIDE(SUM('Table'[Users]),_TOTAL) RETURN DIVIDE(PERCENTAGE_,CURRENT_)Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
V-lianl-msft
5 years agoCommunity Support
Hi Raj007 ,
Please refer to:
Measure =
VAR _COUNTRY = CALCULATE(SUM('Table'[Users]),ALLEXCEPT('Table','Table'[Country]))
VAR _TOTAL = CALCULATE(SUM('Table'[Users]),ALL('Table'))
VAR PERCENTAGE_ = DIVIDE(_COUNTRY,_TOTAL)
VAR CURRENT_ = DIVIDE(SUM('Table'[Users]),_TOTAL)
RETURN DIVIDE(PERCENTAGE_,CURRENT_)
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.