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
wmeyer
Helper III
Helper III

Calculated row total in matrix

I have a matrix showing the revenue for the top 10 items by revenue each month. The values are correct, however the total column does not equal the sum of the values in the row. I am trying to create some sort of calculated column or measure that i can add to replace the total column, or if there is a way to get the total column to calculate correctly, that would be ideal.  Also, totals are not showing up for each row. Can you help me understand why, and how to get them to show up?

 

 

The measure I am using is:

Top 10 Items =
CALCULATE([Total Sales],
FILTER(VALUES('sales order detail'[Item Name]),
IF(RANKX(ALL('sales order detail'[Item Name]),'sales order detail'[Total Sales],,DESC) <=10, [Total Sales],BLANK())))

 

In the measure above, [Total Sales]=Sum([Amount])

 

Matrix total issue.PNG

2 REPLIES 2
v-yulgu-msft
Employee
Employee

Hi @wmeyer,

 

You can have a look at below thread:

Dealing with Measure Totals

 

Best regards,

Yuliana Gu

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

Thank you for posting that thread, however it is not working for me. 

The total column has remained unchanged, after I change the measure to reflect what was in that thread. My new measure is:

Top 10 Items Test=
IF(HASONEFILTER('sales order detail'[Item Name]),
IF(RANKX(ALL('sales order detail'[Item Name]),'sales order detail'[Total SalesTEST],,DESC) <=10, [Total SalesTEST],BLANK()),SUMX('sales order detail','sales order detail'[Amount]))

 

The values are correct in the columns, but the values in the total column are not adding up to the total of the row. 

Also, I would like every row to have a total.

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.