Forum Discussion
hamzashafiq
Kudo Collector
4 years agoDateDiff is not working with Applied Slicers
Hi, I want to calculate the DateDiff between two dates for each Serial Number or the values selected from Slicers. But it always calculates based on the complete data, not for the values filtered...
- 4 years ago
hamzashafiq , If those are dates remove .date
or you can try like
measure =
var _min = minx(allselected(Table), Table[Date])
var _max = maxx(allselected(Table), Table[Date])
returnDatediff(_min, _max, month)
amitchandak
Super User
4 years agohamzashafiq , If those are dates remove .date
or you can try like
measure =
var _min = minx(allselected(Table), Table[Date])
var _max = maxx(allselected(Table), Table[Date])
return
Datediff(_min, _max, month)
hamzashafiq
Kudo Collector
4 years agoThanks amitchandak I removed the .date and it's working now 😀. Have a great day!