Forum Discussion
magutierrez1
3 years agoFrequent Visitor
Matrix Visual
I need to add a third column to matrix visual showing the difference between the filtered period columns. The value for each row in the period column is calcuated from the same field.
hi, magutierrez1
try this one
Period Difference = VAR CurrentPeriod = MAX('YourTableName'[PeriodField]) VAR PreviousPeriod = CALCULATE(MAX('YourTableName'[PeriodField]), FILTER(ALL('YourTableName'), 'YourTableName'[DateField] < MAX('YourTableName'[DateField]))) RETURN CurrentPeriod - PreviousPeriod
1 Reply
- rubayatyasminCommunity Champion
hi, magutierrez1
try this one
Period Difference = VAR CurrentPeriod = MAX('YourTableName'[PeriodField]) VAR PreviousPeriod = CALCULATE(MAX('YourTableName'[PeriodField]), FILTER(ALL('YourTableName'), 'YourTableName'[DateField] < MAX('YourTableName'[DateField]))) RETURN CurrentPeriod - PreviousPeriod