Hi Taylor, could you post a Tableau Packaged workbook with sample data that demonstrates what you're trying to do?
If you want only the years associated with the selected Category to show in the Year filter, then in the Year filter choose "Only Relevant Values". I get the sense you're looking for more than that but am not quite catching what you mean to happen.
Without actually looking at data it is difficult answer. Here's what I understood, you have two dimensions - Category and Year. When you select a particular category only relevant years should populate in the Year filter, correct? If so, set Year filter to show "Only Relevant Values". If this doesn't work, please mock up some data and attach a packaged workbook or at least screenshots.
Jennifer, thank you. There is no "year' filter, there is only a category filter, but the category dimension table contains many columns that could be used to filter data. For instance:
Category_key Description Year_key
1 Period 1 2017
2 Period 2 2017
3 Period 3 2018
4 Period 4 2018
I want a drop down on a dashboard to display "Period 1", but I wanted the data to be filtered by "2017".
ShivaRam, thank you. Please see my reply to Jennifer because she was asking for more info too. I come from a software development background, so what I want to do seems obvious to me, but I can't see a way to do it in Tableau. I wish I could just write the code and skip this UI stuff. :-)
Hmm, ok, I'm still not quite following.
Do you have two data sources? one that is a fact or aggregate table maybe that has Category Key or Description, and another dimension table as listed above? Are you asking how to join so you have access to the dimension columns to use them to filter?
Or do you already have access to the dimension columns in Tableau, and you want this to happen, for example:
Category_key or Description is showing in the view, a dropdown box has the Description values which the user can select. If a user selects "Period 1", the view will be filtered by the corresponding Year, which is 2017, meaning the view will actually show Period 1 and Period 2 since they are both associated with Year 2017?
P.S. I hear you about just writing code. Ages ago I learned SQL because I couldn't handle the restrictions our then GUI-based reporting tool created (before Tableau's time). Not that I write software code, but just flipping data around exactly the way I needed in SQL was extremely liberating.
"Category_key or Description is showing in the view, a dropdown box has the Description values which the user can select. If a user selects "Period 1", the view will be filtered by the corresponding Year, which is 2017, meaning the view will actually show Period 1 and Period 2 since they are both associated with Year 2017?"
This is close. I want to filter by "Period 1" and use the "2017" as a filter for another column. I know I could have two filters, but I don't want the user to have to select from two dropdowns to supply information that could logically be derived from one. I basically want two filters for the price of one. :-)
I apologize for being unclear.
(Since I posted the question, it occurred to me that I might be able to handle the Year in the join, but I'm not sure whether this would hurt the flexibility of the data source to serve other purposes. I'll have to experiment)
I think I get what you're saying, but need a more concrete idea of the end view you wish to create.
Can you attach some sample data in a packaged tableau workbook that gets close to what you want?
So in the same table or chart, you'll have one column which is filtered on category, and a second column implicitly filtered on the selected category's associated year. What is the second column? A measure, or a dimension? I think we need the bigger picture of what you're trying to create to give specific help in the way of calculations or view set up.