Forum Discussion
Anonymous
4 years agoNot applicable
Create a custom measure based on matrix
I have the following matrix: What I want is to get the following calculation as a number (%): Calc = (Count of Promoter - Count of Detractor)/Total (%) How do I do this, to display ...
- 4 years ago
Anonymous try this:
Total Count = COUNTROWS ( YourTable ) Calc = DIVIDE ( CALCULATE ( [Total Count], YourTable[NPS_Segment] = "Promoter" ) - CALCULATE ( [Total Count], YourTable[NPS_Segment] = "Detractor" ), [Total Count] )✨ Follow us on LinkedIn and to our YouTube channel
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.
parry2k
4 years agoSuper User
Anonymous when you added this measure and visualize in the card, you are not getting correct result? Can you confirm?
CALCULATE ( [Total Count], 'NPS_Redeemers'[NPS_SEGMENT] = "Promoter" ) Anonymous
4 years agoNot applicable
Exactly, adding that as a measure should theoretically give me row 1 of the matrix in the question (i.e. 5402) but it gives me 397