Forum Discussion
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 United States or Canada. I would like to get take the sum total Auto Trans = Canada and divide by total sum Auto Trans = United States.
Any help is greatly appreciated.
BLD
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.
4 Replies
- parry2kSuper User
Anonymous Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490 - AnonymousNot applicableHere is my latest attempt:VIO Auto = DIVIDE(sum(vioUsCan[Auto Transmission]),(vioUsCan[Auto Transmission]), (FILTER(vioUsCan[Country] = "Canada"),FILTER(vioUsCan(vioUsCan[Country]= "United States"))
- parry2kSuper User
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.
- AnonymousNot applicable
Yes this will work. Thanks.