Forum Discussion
Date between slicer - Change order
- 5 months ago
Hi PowerBILeaner26 ,
Thank you for the response.The reverse index approach works functionally, but you’re right, it doesn’t show the actual date range to the user.
A common workaround is to keep the reverse index slicer and add a dynamic measure to display the selected date range in a Card visual.
1. Create measures
Selected Start Date =
CALCULATE(
MAX('Date'[Date]),
FILTER(ALL('Date'),
'Date'[ReverseIndex] = MIN('Date'[ReverseIndex])
))
Selected End Date =
CALCULATE(
MIN('Date'[Date]),
FILTER(ALL('Date'),
'Date'[ReverseIndex] = MAX('Date'[ReverseIndex])
))2. Create display measure
Selected Date Range =
"From: " & FORMAT([Selected Start Date], "dd MMM yyyy") &
" To: " & FORMAT([Selected End Date], "dd MMM yyyy")3. Add to report
Keep using ReverseIndex slicer
Add a Card visual
Use Selected Date RangeThis way users can still control the slider (latest to oldest) while clearly seeing:
“From: [Start Date] To: [End Date]”
Hope this helps.Thank you
Hi PowerBILeaner26 ,
Thank you for the response.
The reverse index approach works functionally, but you’re right, it doesn’t show the actual date range to the user.
A common workaround is to keep the reverse index slicer and add a dynamic measure to display the selected date range in a Card visual.
1. Create measures
Selected Start Date =
CALCULATE(
MAX('Date'[Date]),
FILTER(ALL('Date'),
'Date'[ReverseIndex] = MIN('Date'[ReverseIndex])
))
Selected End Date =
CALCULATE(
MIN('Date'[Date]),
FILTER(ALL('Date'),
'Date'[ReverseIndex] = MAX('Date'[ReverseIndex])
))
2. Create display measure
Selected Date Range =
"From: " & FORMAT([Selected Start Date], "dd MMM yyyy") &
" To: " & FORMAT([Selected End Date], "dd MMM yyyy")
3. Add to report
Keep using ReverseIndex slicer
Add a Card visual
Use Selected Date Range
This way users can still control the slider (latest to oldest) while clearly seeing:
“From: [Start Date] To: [End Date]”
Hope this helps.
Thank you
Hello v-echaithra,
Thank you very much for workaround solution. It works perfectly. Much appreciated. Thanks agian!
Thanks.