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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Sergius
Regular 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
Anonymous
Not applicable

@Sergius,

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

Regards,
Lydia

View solution in original post

8 REPLIES 8
Floriankx
Solution Sage
Solution Sage

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.

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?

 

Anonymous
Not applicable

@Sergius,

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

Regards,
Lydia

@Anonymous,

 

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.

Anonymous
Not applicable

@Sergius,

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

Regards,
Lydia

@Anonymous

 

image.png

Anonymous
Not applicable

@Sergius,


My DAX should work with your new sample data.

Regards,
Lydia

Thank you very much! It is great! 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.