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

Calculating % based on unique id and status

image.pngDear community!

 

Recently I have faced with one problem, so needs your help. 

 

I have one database, with unique id, regions and status, that looks like

image.png

 

and separate table with population data 

image.png

what I need is to summarize id and calculate %  where numerator will be sum id of uniq region (but only with TRUE status) and denominator  -  population of the same region. 

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator v-yuezhe-msft
Moderator

Re: Calculating % based on unique id and status

@Sergius,

Please check the DAX in the PBIX file below.
https://1drv.ms/u/s!AhsotbnGu1Nok1EZ842f9zPj1ZiM

Regards,
Lydia

Community Support Team _ Lydia Zhang
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

8 REPLIES 8
Floriankx Established Member
Established Member

Re: Calculating % based on unique id and status

Hello,

 

You could have posted an example of your expected result.

 

You may need something like a mixture of SUMMARIZE and FILTER.

 

But without knowing aim and proper dummy data it is really hard to tell.

Sergius Frequent Visitor
Frequent Visitor

Re: Calculating % based on unique id and status

Each unique ID is an indificator of the person. 

 

The first step could be calculate number of IDs (whith status TRUE) for each region, to understand how many people are in data base.

Than caclulate % from total population of the region.

 

But how?

 

Moderator v-yuezhe-msft
Moderator

Re: Calculating % based on unique id and status

@Sergius,

Please check the DAX in the PBIX file below.
https://1drv.ms/u/s!AhsotbnGu1Nok1EZ842f9zPj1ZiM

Regards,
Lydia

Community Support Team _ Lydia Zhang
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

Sergius Frequent Visitor
Frequent Visitor

Re: Calculating % based on unique id and status

Thank you very much! It is great! 

Sergius Frequent Visitor
Frequent Visitor

Re: Calculating % based on unique id and status

@v-yuezhe-msft,

 

thank you, but I only thing that was missed is that IDs represented people from these regions and should be calculated for each region separately. In this example they were calculated for all regions without desagregation.

Moderator v-yuezhe-msft
Moderator

Re: Calculating % based on unique id and status

@Sergius,

Please post expected result based on the sample data you provide.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Sergius Frequent Visitor
Frequent Visitor

Re: Calculating % based on unique id and status

Moderator v-yuezhe-msft
Moderator

Re: Calculating % based on unique id and status

@Sergius,


My DAX should work with your new sample data.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
New Kudos Received Badges Coming

New Kudos Received Badges Coming

Kudos to you if you earned one of these! Check your inbox for a notification.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (4,438)