Forum Discussion

plmiquelon's avatar
plmiquelon
Frequent Visitor
4 years ago
Solved

Matrix subtotals

Hi, I would like the following matrix to sum the numbers in each column.

 

The idea is that I have a project list (hidden by the green rectangle) with start date of each phase. I have a switch measure that puts a number from 1 to 6 depending on which phase each project is at each week of the year.

 

The result is shown below

 

 

See Phase1 measure : 

 

How can I have a measure or the subtotal calculate correctly?

 

Thank you

 

  • Hi, plmiquelon ;

    You could create another measure.

    Measure 2 = 
    IF(HASONEVALUE('Table'[Date]),
      IF(ISINSCOPE('Table'[Shop]), [Phase1],SUMX('Table',[Phase1])),
         SUMX('Table',[Phase1]))

    The final output is shown below:


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

2 Replies

  •  I recently did 2 videos on this, watch Video 1 here to understand the reason and then you can apply the fix in your report. https://youtu.be/1WWFwnbNPtM

     

    Follow us on LinkedIn and  to our YouTube channel

    I would  Kudos if my solution helped. If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

     

    👉

    plmiquelon

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Community Support

    Hi, plmiquelon ;

    You could create another measure.

    Measure 2 = 
    IF(HASONEVALUE('Table'[Date]),
      IF(ISINSCOPE('Table'[Shop]), [Phase1],SUMX('Table',[Phase1])),
         SUMX('Table',[Phase1]))

    The final output is shown below:


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