Forum Discussion
How to add calculated column for matrix with dinamic dates
- Anonymous1 year ago
Hi Anonymous ,
I am not sure how your source data table is designed, here is my sample.
The test data is as follows.
Creates a measure to calculate the difference between the last day and the day before.Custom Total = VAR a = CALCULATE(SUM('Table'[Amount]),'Table'[Date]=MAX('Table'[Date])) ----Value for the last day VAR b = CALCULATE(SUM('Table'[Amount]),'Table'[Date]=MAX('Table'[Date])-1) ----Value of the day before the last date RETURN a-bAfter adding the measure to the matrix, go to the matrix's formatting settings and disable text wrap in Values and text wrap in Column Headers.
Hide the measure headers under all dates except the last date.
The final result is as follows, hopefully it will meet your needs.
Please see the attahced pbix for reference.
Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
I am not sure how your source data table is designed, here is my sample.
The test data is as follows.
Creates a measure to calculate the difference between the last day and the day before.
Custom Total =
VAR a = CALCULATE(SUM('Table'[Amount]),'Table'[Date]=MAX('Table'[Date])) ----Value for the last day
VAR b = CALCULATE(SUM('Table'[Amount]),'Table'[Date]=MAX('Table'[Date])-1) ----Value of the day before the last date
RETURN
a-b
After adding the measure to the matrix, go to the matrix's formatting settings and disable text wrap in Values and text wrap in Column Headers.
Hide the measure headers under all dates except the last date.
The final result is as follows, hopefully it will meet your needs.
Please see the attahced pbix for reference.
Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.