Forum Discussion
Filtering by dates in two columns
Hi Anonymous ,
You can do the following:
Create two slicers based on each date column.
Then select the first slicer and go to View and click on Sync Slicers, and the Advanced options of the Sync slicers pane write some name like Date.
Now, click on the other slicer and give the same name.
You can check that if you move a slicer the other move accordingly.
After that, and with the second slicer selected go to View -> Selection and click to hide the second slicer.
It's done!
To have it by week, do you have a calendar table in your model? If not You can add two calculated columns to the table with the data, one Week 1 based on settlement date and other Week 2 based on the maturity date.
Week 1 = "Week " & WEEKNUM(table[settlement])
Week 2 = "Week " & WEEKNUM(table[maturity])
And use this new columns in the slicers and do the same process to sync them!
Regards,
Sérgio Silva
- Anonymous4 years agoNot applicable
Thanks Sergio, I synched the sliders and they do interact with eachother. The issue is that when both slicers are have the same week range selected, it looks for rows that have both a settlement and maturity within that week, but there are none.
I would like to have the slicer operate more as an AND type operator: "show maturities within 5/15/22 to 5/21/22 AND settlements between 5/15/22 to 5/21/22"
Does any of that make sense?- SergioSilvaPT4 years agoResolver V
The AND type operator is what both slicers are doing, maybe you want OR...
The example that you gave you're selecting the same date range, so it must be true for both dates, it's maturities date AND settlements date.
If you want OR you have to show both slicers and deactivate the sync between them.
Or did i understand incorrectly?