Forum Discussion

gvanbuhler's avatar
gvanbuhler
Frequent Visitor
5 years ago
Solved

Matrix sub-totals are incorrect

I have a Matrix with multiple groupings and the subtotals are not working correctly.  The visual is filtered to two specific invoices so I can ensure that the totals are working properly. From the T...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi gvanbuhler 

    I think this issue may be caused by your calculate logic in your measure. Maybe in your measure you use All, Allselected or AllExpected Function to filter the table. These function will remove some filters or keep some filters in your table. Subtotal don't have some parameter like GEO, SIC Code, NAICS. So these funtion will cause wrong result in sutotal. 

    I will give some advice to get correct subtotal.

    1. You can try to sum your origin measure by your table.

     

    SUMX([Table],[SALES Measure])

     

    Sometimes you can get correct subtotal by this way.

    2. Calculate the subtotal result by a new measure. Then use If and HASONEVALUE. 

    For example:

     

    Sample = 
    IF(HASONEVALUE(Table[NAICS]),[SALES Measure],[New Measure with result you want])

     

    If this reply still couldn't help you solve your problem, please share a sample with me without sensitive data by your Onedrive for Business. I need to know your data model.

     

    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.