Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

DIVIDE using Filters

Hello,   Thank you to all who reply!   I am trying unsuccessfully to create a percentage for a card using one column "Country" and another column "Auto Trans".   The Country column contains Uni...
  • parry2k's avatar
    3 years ago

    Anonymous add two measures

     

    Sum Measure = sum(vioUsCan[Auto Transmission]
    
    VIO Auto = 
    DIVIDE( 
        CALCULATE ( 
          [Sum Measure], 
          FILTER ( ALLSELECTED ( vioUsCan ), vioUsCan[Country] = "Canada" )
       ), 
       CALCULATE ( 
          [Sum Measure], 
          FILTER ( ALLSELECTED ( vioUsCan ), vioUsCan[Country] = "United State" )
       )
    )

     

     

    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 effort 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.