Forum Discussion
Filter dates using two slicers (From / To)
Hi,
I'm wanting to have two slicer on my page, Quarter From and Quarter To. I've set these up as independnet slicers by creating two tables, Quarter From and Quarter To that are created using the SUMMARIZE function reading from my date table. This means I can make independnet selections in the two slicers. I don't know how to the apply these selections to the actual date table though, so that my selected range is all that is reported on. Currenly my visuals continue to show all Quarters in the dates table, rather than just those in the selected range.
I know this would be easy with a single slicer to choose a date range, but unfortunately I need to have the two options as slicers.
Date Table
| Date | Quarter |
| 01/10/2022 | 2022Q4 |
| ... | 2022Q4 |
| 31/12/2023 | 2022Q4 |
| 01/01/2023 | 2023Q1 |
| ... | 2023Q1 |
| 31/03/2023 | 2023Q1 |
| 01/04/2023 | 2023Q2 |
| ... | 2023Q2 |
| 31/05/2023 | 2023Q2 |
Quarters From / Quarters To
| 2022Q4 |
| 2023Q1 |
| 2023Q2 |
Measures
Selected From =
CALCULATE(
MIN(Dates[Date]),
Dates[Quarter] = 'Quarter From'[Quarter]
)
Selected To =
CALCULATE(
MAX(Dates[Date]),
Dates[Quarter] = 'Quarter To'[Quarter]
)
If I select 2023Q1 in my From slicer and 2023Q2 in my To slicer, any visual will show all 3 quarters in it when I use Quarter from the Dates table in the visual. Can I get it to be dynamic to the selected quarterly values?
Many thanks
satkin , You need a approach like
Select data between months - https://youtu.be/nEt7dT3Tfv4
or
How to use two Date/Period slicers
2 Replies
- amitchandakSuper User
satkin , You need a approach like
Select data between months - https://youtu.be/nEt7dT3Tfv4
or
How to use two Date/Period slicers
- satkinAdvocate I
Fantastic, thank you amitchandak.