Forum Discussion
How to calculate the difference between two measures based on a Date Column
- 3 years ago
Hi,
Create a Calendar Table with a relationship (Many to One and Single) from the Report date column to the Date column of the Calendar Table. To your visual, drag Date column from the Calendar Table. Assuming Budget is a measure that you have already written, write this measure
Measure = [Budget]-calculate([budget],calculatetable(lastnonblank(Calendar[Date],calculate([budget])),datesbetween(calendar[date],minx(all(calendar[Date]),calendar[date]),min(calendar[date])-1)))
If this does not help, then share the download link of the PBI file.
Hi,
Create a Calendar Table with a relationship (Many to One and Single) from the Report date column to the Date column of the Calendar Table. To your visual, drag Date column from the Calendar Table. Assuming Budget is a measure that you have already written, write this measure
Measure = [Budget]-calculate([budget],calculatetable(lastnonblank(Calendar[Date],calculate([budget])),datesbetween(calendar[date],minx(all(calendar[Date]),calendar[date]),min(calendar[date])-1)))
If this does not help, then share the download link of the PBI file.