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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
v-yuezhe-msft
Employee
Employee

@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

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

5 REPLIES 5
v-yuezhe-msft
Employee
Employee

@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

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.

Hi @v-yuezhe-msft

 

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

@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

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.

@v-yuezhe-msft , 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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.