Forum Discussion
Calculating date difference of a dynamic slicer table
- 7 years ago
Hi mady90 ,
You can create measures to get Max date and Min date of date slicer, as well the date difference , like DAX below:
Max date = CALCULATE(MIN(CalendarDate[Date]),ALLSELECTED(CalendarDate[Date])) Min date = CALCULATE(MAX(CalendarDate[Date]),ALLSELECTED(CalendarDate[Date])) DateDiff= DATEDIFF([Min date], [Max date], DAY)
If I misunderstood it, could you please share your sample data and desired output screenshots for further analysis? You can also upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi mady90 ,
You can create measures to get Max date and Min date of date slicer, as well the date difference , like DAX below:
Max date = CALCULATE(MIN(CalendarDate[Date]),ALLSELECTED(CalendarDate[Date])) Min date = CALCULATE(MAX(CalendarDate[Date]),ALLSELECTED(CalendarDate[Date])) DateDiff= DATEDIFF([Min date], [Max date], DAY)
If I misunderstood it, could you please share your sample data and desired output screenshots for further analysis? You can also upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.