Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Adding a New column to Matrix that find the difference between two columns

Hello,    I have this Matrix and I would like to be able to add a third column to the right that shows the difference between the two year columns. The Matrix is just all these values and then year...
  • tamerj1's avatar
    3 years ago

    Hi Anonymous 
    You may activate the columns total and rename it "Difference". Use the following measure in the matrix visual values.

    ResultMeasure =
    IF (
        HASONEVALUE ( 'Table'[Fiscal Year] ),
        [Measure],
        CALCULATE ( [Measure], 'Table'[Fiscal Year] = MAX ( 'Table'[Fiscal Year] ) )
            - CALCULATE ( [Measure], 'Table'[Fiscal Year] = MIN ( 'Table'[Fiscal Year] ) )
    )