Forum Discussion
kevin_peña
3 years agoRegular Visitor
How to get data range from slicer
Good day I need to calculate the days between the data range of a slicer. I've been using the ALLSELECTED function but i noticed that the value it gets me is from the table that is linked to the sl...
samdthompson
3 years agoMemorable Member
Hello, make this measure. It will just pickup the min and max date from the slicer:
DayDiff =
var _min=FIRSTDATE(Query1[Raised_date])
var _max=LASTDATE(Query1[Raised_date])
return
DATEDIFF(_min,_max,DAY)
Cheers
kevin_peña
3 years agoRegular Visitor
This one looks good but it gives me the whole number of days since the table was created, the table starts on 1/31/2016 and ends today 12/19/2022 so the result is 2556 days, that means is ignoring the slicer filter