cancel
Showing results for 
Search instead for 
Did you mean: 
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

 

View solution in original post

This helped a lot. Thank you!

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!