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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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