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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Zaeem7
Frequent Visitor

Display Attribute - Hierarchy along with Measure name in Cross table row(separate columns)

Can someone suggest how can i display Product name and Measure name in rows(separate columns) of a Matrix chart.

 

Below is my dataset:

 

CategoryBrandMonthSalesGross ProfitOperating Profit
AA1Feb20012090
BB1Jan1006040
AA2Mar300170120
BB2Feb3008050

 

I am giving the user flexibity to dynamically select whichever measures they want to see in the Matrix table and for that i have created a seperate table containing only Measure names and this table is used in slicer. I have kept Category - Brand Hierarchy in row, Month - Hierarcy in column and my seperate table in values.

 

How can i create a Matrix chart similar to below:

 

CategoryBrandValuesJanFebMar
AA1Sum of Sales 200 
AA1Sum of Gross Profit 120 
AA1Sum of Operating Profit 90 
AA2Sum of Sales  300
AA2Sum of Gross Profit  170
AA2Sum of Operating Profit  120
BB1Sum of Sales100  
BB1Sum of Gross Profit60  
BB1Sum of Operating Profit40  
BB2Sum of Sales 300 
BB2Sum of Gross Profit 80 
BB2Sum of Operating Profit 50 

 

 

I want to give the user flexibity to drill through Category -hierarchy and Time - Hierarchy to see data at multiple levels. 

 

 

 

 

 

1 ACCEPTED SOLUTION

Hi @Zaeem7,

 

The hierarchy is collapsed in the Matrix by default. So we need to extend to next level to see more details. You can disable the option in the snapshot to make them all show in columns.

Display_Attribute

 

Best Regards,

Dale

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

4 REPLIES 4
quentin_vigne
Solution Sage
Solution Sage

Hi @Zaeem7

 

I don't know if you already did the switch measure but here is for you :

 

After creating your table with measure name in the column, create this measure : 

 

Selection = IF(HASONEVALUE(Table2[Values]);SWITCH(VALUES(Table2[Values]);"Sum of Sales";SUM(Table1[Sales]);"Sum of Gross Profit";SUM(Table1[Gross Profit]);"Sum of Operating Profit";SUM(Table1[Operating Profit]);sum(Table1[Sales])))

Then create your slicer with the table that contain your measure name.

And put your Selection measure in your table.

 

It doesn't look 100% exactly the same but it works. Hope this help enough

 

 

- Quentin

Hi @quentin_vigne

 

Thanks for the reply.

 

Yes, i have done the steps you have mentioned below and i am able to dynamically select Measures from the slicer in the table.. But the issue is i can't see the Measure name unless i drill down to the lowest level.

 

The help needed here is to be able to see Measure names in seperate column and Category - Hierarchy in another. I mean i want to exactly replicate the below table in Power BI Matrix Chart.

 

CategoryBrandValuesJanFebMar
AA1Sum of Sales 200 
AA1Sum of Gross Profit 120 
AA1Sum of Operating Profit 90 
AA2Sum of Sales  300
AA2Sum of Gross Profit  170
AA2Sum of Operating Profit  120
BB1Sum of Sales100  
BB1Sum of Gross Profit60  
BB1Sum of Operating Profit40  
BB2Sum of Sales 300 
BB2Sum of Gross Profit 80 
BB2Sum of Operating Profit 50 

 

Also, do you know how can we apply different conditional formatting to different Measures in above method?

Hi @Zaeem7,

 

The hierarchy is collapsed in the Matrix by default. So we need to extend to next level to see more details. You can disable the option in the snapshot to make them all show in columns.

Display_Attribute

 

Best Regards,

Dale

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

Understood. Thanks a lot!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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