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
Anonymous
Not applicable

Dividing two values in different tables

I currently have 2 tables: Sheet 1 and Census data.

 

I have built the census data to show:

 

Census Data Age/Gender = 
DATATABLE(
"Age Group Name",STRING,
"Male",INTEGER,
"Female",INTEGER,
"Total",INTEGER,
{
{"0-4 yrs",169731,161784,331515},
{"5-14 yrs",344848,330189,675037},
{"15-24 yrs",292492,283960,576452},
{"25-34 yrs",318401,341009,659410},
{"35-44 yrs",368527,378354,746881},
{"45-54 yrs",311036,315009,626045},
{"55-64 yrs",252556,256402,508958},
{"65-74 yrs",184462,189046,373508},
{"75-84 yrs",89313,107191,196504},
{"85+ yrs",23062,44493,67555}
}
)
 
What I'm trying to do is take the count per age group in Sheet1 and multiply it by the Total in the census table
e.g. first value of 0-4 yrs  is 5 therefore (5/331515)*100000 = 1.5
Census Data Age Group1.PNG
 
Thanks in advance
 
1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

You need to use the Age Group column from your Census table in the matrix instead, and then you can use this measure to get your result.

 

NewMeasure =
DIVIDE (
    COUNT ( Sheet1[Event ID] ),
    AVERAGE ( 'Census Data Age/Gender'[Total] )
) * 100000

 
Regards,
Pat
 




Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

3 REPLIES 3
mahoneypat
Microsoft Employee
Microsoft Employee

You need to use the Age Group column from your Census table in the matrix instead, and then you can use this measure to get your result.

 

NewMeasure =
DIVIDE (
    COUNT ( Sheet1[Event ID] ),
    AVERAGE ( 'Census Data Age/Gender'[Total] )
) * 100000

 
Regards,
Pat
 




Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

Followed what you said there and my numbers seem a little off. E.g. week 27  0 -4yrs has 6 counts so should be divided by 331515 *100000 = 1.8

where i get week 27.PNG trying to figure out where the calculations are deviating.

Thanks for the help so far @mahoneypat 

@Anonymous  In my file, I do have 1.8 for 27 weeks 0-4 yrs.  Do you have other filters on the visual?

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
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.