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
supergallager34
Frequent Visitor

Percentage of count

Hello, 

I am trying to figure out how to calculate percentage of rows because I need it for another calculation. I  have a sample table that looks like this, 
IDGender

101M
102F
103M
104F
105F
106F
107M
108M
109M
110M
115F


I am trying to figure out how this is calculated my actual table has a lot of duplicates and I would the denominator to be dynamic and taking in the distinct count of the IDS. Please let me know what the possible solution would be. Thank you
Capture.JPG

 

 

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @supergallager34 

 

Try this Measure

Measure = 
DIVIDE(
    DISTINCTCOUNT( 'Table'[ID] ),
    CALCULATE(
        DISTINCTCOUNT( 'Table'[ID] ),
        ALLSELECTED()
    )
)

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

View solution in original post

2 REPLIES 2
Mariusz
Community Champion
Community Champion

Hi @supergallager34 

 

Try this Measure

Measure = 
DIVIDE(
    DISTINCTCOUNT( 'Table'[ID] ),
    CALCULATE(
        DISTINCTCOUNT( 'Table'[ID] ),
        ALLSELECTED()
    )
)

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

This helped a lot. Thank you!

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.

Top Solution Authors