cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Microsoft
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
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.

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors