Forum Discussion

satubuku83's avatar
satubuku83
Frequent Visitor
8 years ago
Solved

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

  • Anonymous's avatar
    Anonymous
    8 years ago

    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.





    Regards,
    Lydia

5 Replies

  • Anonymous's avatar
    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.





    Regards,
    Lydia

    • satubuku83's avatar
      satubuku83
      Frequent Visitor

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

  • satubuku83's avatar
    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