Forum Discussion
Capture Slicer Settings -Relative Date
- Anonymous1 year ago
Hi, armchairexpert
Thanks for ajohnso2's reply. You can try following measure to get the min and max date, then calculate the difference between the date. It's worth noting that if you create two slicers, the two slicers will affect each other, so you'll need to create two Date fields for it to workDay Diff 1 = VAR _minDate = MIN('Date'[Date]) VAR _maxDate = MAX('Date'[Date]) VAR _dayDiff = INT(_maxDate - _minDate) RETURN _dayDiff Day Diff 2 = VAR _minDate = MIN('Date 2'[Date]) VAR _maxDate = MAX('Date 2'[Date]) VAR _dayDiff = INT(_maxDate - _minDate) RETURN _dayDiffBest Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi, armchairexpert
Thanks for ajohnso2's reply. You can try following measure to get the min and max date, then calculate the difference between the date. It's worth noting that if you create two slicers, the two slicers will affect each other, so you'll need to create two Date fields for it to work
Day Diff 1 =
VAR _minDate = MIN('Date'[Date])
VAR _maxDate = MAX('Date'[Date])
VAR _dayDiff = INT(_maxDate - _minDate)
RETURN
_dayDiff
Day Diff 2 =
VAR _minDate = MIN('Date 2'[Date])
VAR _maxDate = MAX('Date 2'[Date])
VAR _dayDiff = INT(_maxDate - _minDate)
RETURN
_dayDiff
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
- armchairexpert1 year agoHelper III
Hi Anonymous ,
Thanks for your response. That is exactly what I was looking for. Thanks for your help on this.
Kind regards.