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
satubuku83
Frequent Visitor

Multiple measures as hierarchy in matrix

Hi All,

 

I am new (1 month exp) in using Power BI. I am having some difficulties in designing the matrix in Power BI. Would greatly appreciate if you could share any solutions to it.

 

Design of Fact table:

Policy IDYearFranchiser IndicatorCar MakeEarned PremiumEarned CountAverage Earned Premium
12016FranchiserPerodua40000100400
22016Non FranchiserPerodua2000040500
32016FranchiserHonda3000080375
42016Non FranchiserHonda1500030500
52017FranchiserPerodua3500080437.5
62017Non FranchiserPerodua25000201250
72017FranchiserHonda25000251000
82017Non FranchiserHonda1000020500

 

I would like to have output in Power Bi as Matrix in following format (assuming metrics values are in center of header):

 

MetricsEarned Premium     Earned Count     Average Earned Premium     
Year2016  2017  2016  2017  2016  2017  
Make/Franchiser IndFranchiserNon FranchiserTotalFranchiserNon FranchiserTotalFranchiserNon FranchiserTotalFranchiserNon FranchiserTotalFranchiserNon FranchiserTotalFranchiserNon FranchiserTotal
Perodua400002000060000350002500060000100401408020100400500900437.512501687.5
Honda300001500045000250001000035000803011025204537550087510005001500

 

Is there any way to do this in Power BI? Or the only was is to create another table by denormalizing the fact table then only i can do in such format?

 

Regards

CS

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@satubuku83,

Do you create calculated measures called Earned Premium,Earned Count, Average Earned Premium in your table? Or do you have built-in fields(or calculated columns) called Earned Premium,Earned Count, Average Earned Premium in the table?

If you the mentioned fields are calculated measures, you would need to create a disconnected table as described in this similar blog. If the mentioned fields are built-in, you can create a Matrix visual and drill down it using the highlighted button as shown in the following screenshot.


1.PNG


Regards,
Lydia

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

@satubuku83,

Do you create calculated measures called Earned Premium,Earned Count, Average Earned Premium in your table? Or do you have built-in fields(or calculated columns) called Earned Premium,Earned Count, Average Earned Premium in the table?

If you the mentioned fields are calculated measures, you would need to create a disconnected table as described in this similar blog. If the mentioned fields are built-in, you can create a Matrix visual and drill down it using the highlighted button as shown in the following screenshot.


1.PNG


Regards,
Lydia

Hi @Anonymous

 

Thanks for reply. Really appreciate.

I am using dax measures for the calculation.

And most importantly, measure needs to show first, then only break down by franchise and non franchise.

 

Seemed like there is no easier way but to design it in normalized form...

Anonymous
Not applicable

@satubuku83,

Have your created DAX as shown in the blog below?

https://exceleratorbi.com.au/measures-on-rows-here-is-how-i-did-it/

Regards,
Lydia

@Anonymous , Many thanks for the solution.

I took quite a long time to understand it. Interesting way instead of denormalizing.

Appreciate the advice!

satubuku83
Frequent Visitor

Hi All,

 

I am new to Power BI (1 month exp).

I have the following fact table :

 

Policy IDYearFranchiser IndicatorCar MakeEarned PremiumEarned CountAverage Earned Premium
12016FranchiserPerodua40000100400
22016Non FranchiserPerodua2000040500
32016FranchiserHonda3000080375
42016Non FranchiserHonda1500030500
52017FranchiserPerodua3500080437.5
62017Non FranchiserPerodua25000201250
72017FranchiserHonda25000251000
82017Non FranchiserHonda1000020500

 

And would like to output as following as a matrix in Power BI

 

MetricsEarned Premium     Earned Count     Average Earned Premium     
Year2016  2017  2016  2017  2016  2017  
Make/Franchiser IndFranchiserNon FranchiserTotalFranchiserNon FranchiserTotalFranchiserNon FranchiserTotalFranchiserNon FranchiserTotalFranchiserNon FranchiserTotalFranchiserNon FranchiserTotal
Perodua400002000060000350002500060000100401408020100400500900437.512501687.5
Honda30000150004500025000100003500080301102520453755008751000500

1500

 

 

Is there any way to do this using the fact table design in Power BI or the only way to display as such is by denormalizing the fact in Power BI?

 

Regards

CS

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.