Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

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 ...
  • parry2k's avatar
    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.