Forum Discussion
Auto clear selection for the second date slicer
Hello,
I have a date slicer with predefined date ranges (Date Slicer #1) and a second slicer with custom date ranges (Date Slicer #2). When I select a predefined date range and clear any previous selection from Date Slicer #2, it displays the appropriate start and end dates matching the predefined date range. However, when I select 'Custom' in Date Slicer #1, choose specific start and end dates in Date Slicer #2, and then select another predefined date range in Date Slicer #1 without clearing the selections in Date Slicer #2, Date Slicer #2 retains the previously selected start and end dates. The previously selected dates must be cleared before selecting a predefined date range to ensure the date ranges align correctly.
The interaction is Filter in both directions for both date slicers.
Is there a way to automatically clear the selections in Date Slicer #2, whenever a predefined date range is selected in Date Slicer #1?
Thanks in advance for your help with this!
Thnak you for your message Anonymous . I solved the problem using a relaive date slicer, so tat I only have one slicer and I can get the relative date ranges I need.
Thanks!
6 Replies
- LexignotFrequent Visitor
Hi Anonymous ,
Thanks for your answer. I want the Date Slicer #1 and #2 to be aligned in terms of date range, so they need to filter each other actually (i.e. I don't want the interaaction between them to be "None" as you mentioned in your answer).
Issue: When I select 'Custom' in Date Slicer #1, choose specific start and end dates in Date Slicer #2, and then select another predefined date range in Date Slicer #1 without clearing the selections in Date Slicer #2, Date Slicer #2 retains the previously selected start and end dates. The previously selected dates must be cleared before selecting a predefined date range to ensure the date ranges align correctly.
Expected behavior: Date Slicer #2 selection should auto-clear when I select a pre-defined date range in Date slicer #1.Question: Is there a way to automatically clear the selections in Date Slicer #2, whenever a predefined date range is selected in Date Slicer #1?
Thanks
- AnonymousNot applicable
Hi,Lexignot .
Thank you for your reply.
Based on your description I suggest you try the following suggestions
1.Recreate a date table for the second slicer, which is filtered against the main table, but not related to the date table used by the first slicer
like this.2. If you don't want to create the relationship manually, you can also achieve the effect of filtering the slicer by creating a MEASURE (the selection of this slicer will also not affect other slicers)
like this:I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- LexignotFrequent Visitor
Hi Anonymous ,
Thanks for sharing this but I don't think this answer my problem. Please see attached (link) my dashboard and below a picture illustrating the problem: today's date is June 6 in my local time and you can clearly see the time range difference between the two date slicers if I don't clear the selection in the Date slicer #2.
Hence my initial question, is there a way to automatically clear the selections in Date Slicer #2, whenever a predefined date range is selected in Date Slicer #1?
- AnonymousNot applicable
Hi,Lexignot
I am glad to help you.According to your description, you want to set up a dynamic interaction between two slicers that filter the same field.
After checking the selection of one slicer, clear the selection of the other slicer
If I understand you correctly, you can try the following suggestion.
select visual1>Format>Edit interactions
select Visual2
Now visual1 won't affect visual2. This setting has an effect on the slicer as well.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- LexignotFrequent Visitor
Thnak you for your message Anonymous . I solved the problem using a relaive date slicer, so tat I only have one slicer and I can get the relative date ranges I need.
Thanks!