Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Help with adding variance column to matrix table

Hello,

 

Im hoping this is a simple solution . How can I add variance column that calculates difference between Q1 and Q2 to the table?

 

 

  • Hi, Anonymous 

    I think your original matrix should be similar to this.

    It is not recommended to apply the 'quarter' field to the matrix column, you need to consider adding new measures to calculate the values of q1, q2, difference between Q1 and Q2.

    M_Q1 = CALCULATE(SUM('Table'[Sales] ),FILTER('Table','Table'[Quarter]="Q1"))
    M_Q2 = CALCULATE(SUM('Table'[Sales] ),FILTER('Table','Table'[Quarter]="Q2"))
    dif = [M_Q2]-[M_Q1]

    Please check my attachment for more information.

     

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

1 Reply

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

    Hi, Anonymous 

    I think your original matrix should be similar to this.

    It is not recommended to apply the 'quarter' field to the matrix column, you need to consider adding new measures to calculate the values of q1, q2, difference between Q1 and Q2.

    M_Q1 = CALCULATE(SUM('Table'[Sales] ),FILTER('Table','Table'[Quarter]="Q1"))
    M_Q2 = CALCULATE(SUM('Table'[Sales] ),FILTER('Table','Table'[Quarter]="Q2"))
    dif = [M_Q2]-[M_Q1]

    Please check my attachment for more information.

     

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