Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

yes/no percentage

Hi, 

 

i want to work out the percentage for yes for every country 

eg if sweden has 20 records consisting of Yes,TBC, No, i want to work out the percentage of yes out of those 20 records and same for every other country.

 

can you please advise

i would appreciate any advice

maz_1-1611324808667.png

 

1 ACCEPTED SOLUTION
v-janeyg-msft
Community Support
Community Support

Hi, @Anonymous 

 

According to your description,I think you can create a measure.

Like this:

Measure =
VAR a =
    COUNTX (
        FILTER (
            ALL ( 'Table' ),
            [value] = "yes"
                && [country] = SELECTEDVALUE ( 'Table'[country] )
        ),
        [value]
    )
VAR b =
    COUNTX (
        FILTER ( ALL ( 'Table' ), [country] = SELECTEDVALUE ( 'Table'[country] ) ),
        [value]
    )
RETURN
    DIVIDE ( a, b )

5.png

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-janeyg-msft
Community Support
Community Support

Hi, @Anonymous 

 

According to your description,I think you can create a measure.

Like this:

Measure =
VAR a =
    COUNTX (
        FILTER (
            ALL ( 'Table' ),
            [value] = "yes"
                && [country] = SELECTEDVALUE ( 'Table'[country] )
        ),
        [value]
    )
VAR b =
    COUNTX (
        FILTER ( ALL ( 'Table' ), [country] = SELECTEDVALUE ( 'Table'[country] ) ),
        [value]
    )
RETURN
    DIVIDE ( a, b )

5.png

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

VijayP
Super User
Super User

@Anonymous 
Create a Measure 

YesCount = Calculate(count(termination issued),filter(all(tablename),terimination issued ="Yes"))
Then  create another measure , divide (yescount,Count(termination issued),0) and add this to the visual to show Yes % separately! Let me know if any further help requried!




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.