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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
adam_b
Frequent Visitor

Matrix - Multiple Rows

Hi,

Hoping someone can point me in the right direction or what I am missing?


When I have one row in my Matrix the values display correct - however as soon as I have multiple Rows to allow drilldown etc the Values are wrong.

 

See example below.

 

1 row in Matrix

CategoryTotal
Category A50
Category B42

 

 

Multiple Rows in Matrix

CategoryTotal
Category A33
         Product 115
         Product 210
         Product 38
Category B19
         Product 113
         Product 2 
  
7 REPLIES 7
Anonymous
Not applicable

Hi @adam_b 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.

 

Best Regards,

Rico Zhou

Anonymous
Not applicable

Hi @adam_b 

I think your problem is when you only add category into Matrix Row, you measure shows correct result you want.

(Category A Total = 50, Category B Total = 42)

When you add multiple columns into the Matrix Row (Catehory and Product) , your measure will return to a wrong result.

Is your wrong measure:TotalPrevious?

Please share a sample without sensitive data like what you are dealing with me by your Onedrive for Business.

And you can show me a screenshot of the result you want.

This may make it easier for me to understand your measure.

 

Best Regards,

Rico Zhou

 

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

 

 

Hi @Anonymous 

 

Difficult to share data as its being pulled straight from SQL and for some reason If I make an example data in Excel it seems to work ok?

 

See below, first screenshot is with just one row - however I've noticed the Spend (Same Period Last Year) still is not correct.

Second screenshot is when I add in multiple rows the previous year value decreases.

 

This is for periods 01/08/2020 - 31/08/2020 - so the Spend (Same Period Last Year) should be showing around £94k but even with one row it is still incorrect.
If I change the Date Filter to show 01/08/2019 - 31/08/2019 I get £94k but with one row its showing £88k and with 3 rows it shows £32k.


I dont know if its my data, measure or I'm just doing something wrong?

 

My Measure is 

 

Spend(Same Period Last Year) = CALCULATE(SUM(Query1_2[LINE_AMOUNT]),SAMEPERIODLASTYEAR('Date'[Date]))

 

1row.png3rows.png

adam_b
Frequent Visitor

Wow. Really confused dont know if its because I have a Date Slicer which Syncs between pages, however Just created a standalone date slicer and matrix table and it seems to work...

Anonymous
Not applicable

Hi @adam_b 

I think you need to build a unrelated Date table to be your slicer.

If your Date table which you used to build date slicer is related to your Fact table, the time intelligence function may show wrong result due to the filter.

 

Best Regards,

Rico Zhou

 

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

 

AllisonKennedy
Community Champion
Community Champion

@adam_b  Can you provide some more info please? Is "Total" a DAX measure? If so, what is the formula and how are the tables related in model view to Category and Product name and totals?


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Probably a better explination, I think I rushed when posting this. TotalNow = CALCULATE(SUM(Data[LINE_AMOUNT])) TotalPrevious = CALCULATE(SUM(Data[LINE_AMOUNT]),SAMEPERIODLASTYEAR('Dates'[Date])) TotalNow works fine as far as I can see however my TotalPrevious is to calculate the same period on the previous year - this works fine when I only have 1 row as soon as I add in multiple rows to have drilldown the TotalPrevious figures are wrong? Took me about 40 minutes to post this as I keep getting a message saying my post has INVALID HTML in the message body...then when trying to re-post it tells me i'm flooding/spamming change the message and back in a loop..

Helpful resources

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

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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