This is really manual setting, but do-able.
Completely blank worksheet with filter only shows when parameter is year.
Another completely blank worksheet.
Only expanded when year is selected.
Add another blank worksheet to hide expanded area.
Here I provide two options:
Example one toggles between the two different filters. As you can see, they remain in the same place:
Due to how I built it (only show Relevant values on each), I added helper text after they filter down:
In second option, it's the same dropdown, but different values show up using DATETRUNC.
Again, due to how this works, if they don't have All selected, they will have a value(s) selected that doesn't exist in the other list, so it'll appear blank at first. Easy to learn/understand, but may be frustrating at times.
Hope these options help! v10.3 attached.
Period Type Filter.twbx 1.2 MB
Thanks for your response. This is same as my expectation. Could you please let me know the steps to achieve this. Thanks in advance.
I see here, year & qtr are derived attributes from Order date attribute. But in my case, i have separate fiscal year & fiscal qtr columns. I that case how can we achieve this filter swapping in sheet?
Hi Shruthi B S
Does this mean Year and Quarter are brought in by the dataset? I'm unable to open your workbook as I'm on 10.3 unfortunately. Can you upload this version?
Curious how these are stored. It could add an extra layer of complexity if so. But might have an idea.
What are your thoughts on combining these into one field instead? Then you could base it on one field and use Example 2 I provided above. I would also suggest making one common date field regardless for use in other vizzes.
I can't fully do it as I don't know when your FY begins, but something like:
Regardless, first step is to make a sheet that will expand. Make a field that confirms you're look at Quarter and use this to create the sheet.
Then uncheck show header, hide tooltips, click color and change opacity to 0%, and then edit Borders to remove the Row Divider for the pane. The sheet will now appear blank.
Place this sheet, the Year filter, the Quarter filter, and a Blank all in one horizontal container. Fixed the width for everything except the sheet you just made that is meant to expand. Fit this sheet to entire view.
Float the parameter dropdown over the top left. This is where the the Quarter dropdown will hide behind. Also float a Text object over the Year dropdown. This is where the Year dropdown will hide.
When you change the parameter to Year, the sheet we made earlier will collapse and the Quarter dropdown will move to the left, now only showing the Year dropdown.
ALTERNATIVELY - different sheets for each view:
If you want to avoid issue of the sheet occasionally disappearing due to the differences between the dropdowns, you could continue with what you currently have - two sheets - one for year and one for quarters.
You just need to place these together in a vertical container and remove titles so that they can collapse.
Then you can build the same approach I mentioned above for hiding the different filters.
Please see both approaches attached (v10.3).
Thank You so much for this wonderful trick. I worked as expected.
Glad to help!
Hi @Bryce Larsen,
Is there a way to achieve swapping of filters if i have to swap 3 filters. In the above example we did swap Year & Qtr. Now i wanted to swap 3 filters ie., Year,Qtr & Month. I try to do it using similar technique but failed. Could you help in this regard.
Sorry for delay!
Did you end up combining into one filter or multiple different ones still?
You can look to use all 3 (I've actually just done this) in one horizontal container (but this can be a lot of work with collapsing/expanding sheets) or keep 2 in a horizontal container and one in a vertical container that can expand over the others. However, this only works if publishing onto a server - at least this is my experience. On the desktop it doesn't collapse and blocks the other container.
Sorry if this is confusing! Are you publishing onto a server?
Yes, i will publish my final work onto Tableau Server. I still have different filters for Yr,Qtr & Month. Could you explain the technique to get 3 filter swap. Will I be able to test on desktop before publishing?