Forum Discussion
Finding the difference between two amounts within a slicer range
- 8 years ago
Hi,
Try this
=CALCULATE(SUM(your_measure),FILTER(Data,Data[snapshotdate]=MAX(calendar[date])))-
CALCULATE(SUM(your_measure),FILTER(Data,Data[snapshotdate]=MIN(calendar[date])))
Ensure the following:
1. There is a calendar table
2. There should be a relationship from the Snapshotdate in the Data table to the Date column in your calendar table
3. In the KPI visual, drag the date from the calendar table
4. The slicer should be built from the Date column of the calendar table
Hope this helps.
Hi,
Try this
=CALCULATE(SUM(your_measure),FILTER(Data,Data[snapshotdate]=MAX(calendar[date])))-
CALCULATE(SUM(your_measure),FILTER(Data,Data[snapshotdate]=MIN(calendar[date])))
Ensure the following:
1. There is a calendar table
2. There should be a relationship from the Snapshotdate in the Data table to the Date column in your calendar table
3. In the KPI visual, drag the date from the calendar table
4. The slicer should be built from the Date column of the calendar table
Hope this helps.
Thanks Ashish, this seemed to work. I was having a comparison error but I realized I was using two different types of data for 'Data[snapshotdate]' and 'MAX(calendar[date])'.
Appreciate it!
Anonymous I appreciate the additional help, I'll keep it in mind!