cancel
Showing results for
Did you mean:
Highlighted
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])

2 REPLIES 2
Highlighted
Microsoft

## Re: Calculated row total in matrix

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.
Highlighted
Helper III

## Re: Calculated row total in matrix

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.