Forum Discussion
Dynamic date range slicer with only the max date (end date) selected and ignoring the min date
- 1 year ago
This worked for me:
ABC =
VAR enddate = CALCULATE(
MAX('Table'[Date]),
FILTER('Table', 'Table'[Year] = SELECTEDVALUE('Max Year'[Year]))
)
RETURN
CALCULATE(
SUM('Table'[Cost]),
'Table'[Date] <= enddate,
REMOVEFILTERS('Time Shift Table'), -- Remove all the tables which affect the date
REMOVEFILTERS('Table') -- In my case I had a Time shift table and a Date Table
)
Thanks!
This worked for me:
ABC =
VAR enddate = CALCULATE(
MAX('Table'[Date]),
FILTER('Table', 'Table'[Year] = SELECTEDVALUE('Max Year'[Year]))
)
RETURN
CALCULATE(
SUM('Table'[Cost]),
'Table'[Date] <= enddate,
REMOVEFILTERS('Time Shift Table'), -- Remove all the tables which affect the date
REMOVEFILTERS('Table') -- In my case I had a Time shift table and a Date Table
)
Thanks!