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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
MatthewTu
Regular Visitor

Matrix report show different data on different matrix layers

Hi guys, I am trying to build a matrix report that can show each layer's data.

I have 2 tables. One is SKU table the other is each sku' demand table.

MatthewTu_0-1723098258035.png   

MatthewTu_1-1723098281079.png

I want matrix report can show each level's data. But it ends up the wrong data, like below Pic shows. Can someone help me with this issue?

MatthewTu_2-1723098573496.png

 

 

 

1 ACCEPTED SOLUTION
MatthewTu
Regular Visitor

 @audreygerred  thanks for your solution.

 @Anonymous  thanks your solution. It works perfect. I get expected matrix report by using DAX you provide.

View solution in original post

3 REPLIES 3
MatthewTu
Regular Visitor

 @audreygerred  thanks for your solution.

 @Anonymous  thanks your solution. It works perfect. I get expected matrix report by using DAX you provide.

Anonymous
Not applicable

Hi All
Firstly @audreygerred  thank you for you solution !
And @MatthewTu for your question, we can use the ISINSCOPE function to determine the hierarchical structure, we have to start at the bottom to see if it is the lowest level and then recurse up the hierarchy.

vxingshenmsft_0-1723194463471.png

Measure_Switch = 
SWITCH(
   TRUE(),

   ISINSCOPE('Table'[Level 5 SKU]),CALCULATE(SUM('Table (2)'[Demand]),'Table (2)'[SKU]=MAX('Table'[Level 5 SKU])),
   ISINSCOPE('Table'[Level 4 SKU]), CALCULATE(SUM('Table (2)'[Demand]),'Table (2)'[SKU]=MAX('Table'[Level 4 SKU])),
   ISINSCOPE('Table'[Level 3 SKU]), CALCULATE(SUM('Table (2)'[Demand]),'Table (2)'[SKU]=MAX('Table'[Level 3 SKU])),
   ISINSCOPE('Table'[Level 2 SKU]), CALCULATE(SUM('Table (2)'[Demand]),'Table (2)'[SKU]=MAX('Table'[Level 2 SKU])),
   ISINSCOPE('Table'[Level 1 SKU]), CALCULATE(SUM('Table (2)'[Demand]),'Table (2)'[SKU]=MAX('Table'[Level 1 SKU])),
   0
)

vxingshenmsft_1-1723194512114.png

If you still have questions, check out the Pbix file I uploaded, I hope it helps!

 

Hope it helps!

 

Best regards,
Community Support Team_ Tom Shen

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

 

audreygerred
Super User
Super User

What is the join that you have between your two tables?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.