Forum Discussion
NJ81858
Helper IV
2 years agoCreating slicer to filter measure
Hello, I have a measure that calculates the amount of change in total sales for each sales person between the first date and the most recent date, and I would like to create a slicer to filter th...
khaledHabib90
Resolver II
2 years agoYou will probably need 2 separate date tables to use in the slicer, one for the _Enddate another for the _Startdate
the 2 tables shouldn't have any relationship with your sales table
your Variables should look something like this
Amount of Change =
VAR _end = SELECTEDVALUE('Yourdatecolumn in the end date table')
VAR _start = SELECTEDVALUE('Yourdatecolumn in the start date table')
VAR _startnum = CALCULATE(SUM('Sales'[Total Sales]), FILTER('Sales', [Date] = _start))
VAR _endnum = CALCULATE(SUM('Sales'[Total Sales]), FILTER('Sales', [Date] = _end))
RETURN
_endnum - _startnum
If I answered your question please accept this reply as the solution 🙂