cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
mertzin Frequent Visitor
Frequent Visitor

Sum category per zipcode and show percentage of male/female per zipcode

Hi guys,

 

I have a dataset which contains the following, but i can't seem to get the % of zipcode working.

ZipcodeGenderNumber of contacts% of zipcode
10female100062,5%
10Male60037,5%
20female80066,7%
20Male40033,3%
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Sum category per zipcode and show percentage of male/female per zipcode

Hi @mertzin 

Create a measure

Measure =
CALCULATE (
    SUM ( Table1[Number of contacts] ),
    ALLEXCEPT ( Table1, Table1[Zipcode], Table1[Gender] )
)
    / CALCULATE (
        SUM ( Table1[Number of contacts] ),
        ALLEXCEPT ( Table1, Table1[Zipcode] )
    )

1.png

Best Regards
Maggie

 

Community Support Team _ Maggie Li
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
Community Support Team
Community Support Team

Re: Sum category per zipcode and show percentage of male/female per zipcode

Hi @mertzin 

Create a measure

Measure =
CALCULATE (
    SUM ( Table1[Number of contacts] ),
    ALLEXCEPT ( Table1, Table1[Zipcode], Table1[Gender] )
)
    / CALCULATE (
        SUM ( Table1[Number of contacts] ),
        ALLEXCEPT ( Table1, Table1[Zipcode] )
    )

1.png

Best Regards
Maggie

 

Community Support Team _ Maggie Li
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

mertzin Frequent Visitor
Frequent Visitor

Re: Sum category per zipcode and show percentage of male/female per zipcode

@v-juanli-msft It worked like a charm! Thank you very much!

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors