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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.