0

I have 2 date slicers and a measurement which is [Profit], I would like to return the difference in Profit given the date selections. Please see below for detail.

  • Date Slicer 1: 3/7/2021-3/13/2021
  • Date Slicer 2: 3/14/2021-3/20/2021
  • Profit given Date Slicer 1: 10
  • Profit given Date Slicer 2: 15
  • Value I am trying to get = 5 (15-10)
MLS
  • 108
  • 14

1 Answers1

0

If the two slicers come from the same Date column, both periods do not intersect each other and you get a filter without dates.

Possibly there are better solutions but one of them would be to use a Harvester Filter (Creating an additional table containing a copy of the date column unrelated to the model, aka Disconnected Tables)

Before moving on to the next part you can verify that the filter contains the same dates but since it is a disconnected table, it does not filter the model, yet

For the [Profit given Date Slicer 1] you can use the original measure

For the [Profit given Date Slicer 2] you must change the filter to:

DATESBETWEEN(
'Dates'[Date],
MIN(HarvestingDates[Date]),
MAX(HarvestingDates[Date])
)
jprzd
  • 481
  • 2
  • 3