Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Matrix Subtotals

Hi all,

 

I have a matrix as follows: 

 

I am trying to achieve both column and row totals of 100%. As you can see, this works correctly for the columns but for each row it sums the values for each person e.g. total of 1422.5 % should be 100%. How can I edit this measure or is there another workaround? I use the following measure as the values:

 

% Summary Total =

VAR SettlementVal = [Total]

VAR SelectedName = MAX(Times[name])

VAR AllSettlement =

CALCULATE (

    [Total],

    FILTER(ALLSELECTED(Times), Times[name] = SelectedName)

)

VAR Result = DIVIDE(SettlementVal, AllSettlement)

RETURN

    FORMAT(Result, "0.0%")

7 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous 

    Did your row field and the column field are from the same table? Can you provide some sample data so that can provide more suggestion for you.

     

    Best Regards!

    Yolo Zhu

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Anonymous,

       

      Thanks for your response. All data is from the same table:

       

       

       

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Anonymous 

        You can try the following measure

        Measure =
        SUMX ( VALUES ( Times[name] ), [% Summary Total] )

        Best Regards!

        Yolo Zhu

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