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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
ecoale
Helper I
Helper I

Getting totals from 2 matrices in a third matrix

Hi friends, I really need help 😞

 

I have 2 matrices (years 2015 and 2018) with the distribution of students for sex (number and %):

2015:                                 2018:

M: 10, 33,3%                     M: 15, 55,6%

F: 20, 66,7%                       F: 12, 44,4%

n.d.: 1                                n.d.: 3

total: 31                            total: 30

PS the % were got, in PBI desktop, dropping the coloumns "number of students" in values, and then filtering excluding the not available (n.d.)

 

Now, I need to find the way (I mean automaticly with DAX, not manually) to get a third matrix showing the two distribution %:

              2015    2018

M:          33,3%  55,6%

F:            66,7%  44,4%

total:  100,0%  100,0%

 

I tried lots of ways... but I do not find anything... anybody could help me please??

Thanks a lot in advance.

1 ACCEPTED SOLUTION
v-diye-msft
Community Support
Community Support

Hi @ecoale 

 

I created a sample same as yours, but calculate the percentage using calculated column instead of measure:

2015 = IF('2015'[Sex]="n.d",BLANK(),DIVIDE('2015'[Number],CALCULATE(SUM('2015'[Number]),FILTER(ALL('2015'),'2015'[Sex]="F"||'2015'[Sex]="M"))))

2018 = IF('2018'[Sex]="n.d",BLANK(),DIVIDE('2018'[Number],CALCULATE(SUM('2018'[Number]),FILTER(ALL('2018'),'2018'[Sex]="F"||'2018'[Sex]="M"))))

And then the third matrix could be generated with the total percentage

8.png

Pbix attached here for your reference: https://wicren-my.sharepoint.com/:u:/g/personal/dinaye_wicren_onmicrosoft_com/EdbOuB01DW5KulBtcp90dO...

 

Best regards,

Dina Ye

Community Support Team _ Dina Ye
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

3 REPLIES 3
v-diye-msft
Community Support
Community Support

Hi @ecoale 

 

I created a sample same as yours, but calculate the percentage using calculated column instead of measure:

2015 = IF('2015'[Sex]="n.d",BLANK(),DIVIDE('2015'[Number],CALCULATE(SUM('2015'[Number]),FILTER(ALL('2015'),'2015'[Sex]="F"||'2015'[Sex]="M"))))

2018 = IF('2018'[Sex]="n.d",BLANK(),DIVIDE('2018'[Number],CALCULATE(SUM('2018'[Number]),FILTER(ALL('2018'),'2018'[Sex]="F"||'2018'[Sex]="M"))))

And then the third matrix could be generated with the total percentage

8.png

Pbix attached here for your reference: https://wicren-my.sharepoint.com/:u:/g/personal/dinaye_wicren_onmicrosoft_com/EdbOuB01DW5KulBtcp90dO...

 

Best regards,

Dina Ye

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

Hi!

 

Can you please reupload the pbix file?

 

Thank you!

My friend thank a lot!

precious helpppppp 🙂

thanks

have a nice day

Alessio

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.