First, you should save the workbook as a twbx file as, depending on which version of Tableau people are running, some might not have that data set.
I think your best solution would be to float view 1 and view 2 on top of each other and then add a filter action based on the overall. When you select a customer only related to one state, the information for the other state should disappear. Let me know if this won't work for you and we can think of another solution.
Thanks Wesley for your reply. I am attaching the twbx version.
I have worked with filter actions, but I am not understanding how to do the filter action here for this specific purpose.
To add more depth to my problem:
The overall can have many number of customers from any states.
For simplicity right now I have customers from 5 states. But the 2 views are fixed. a customer can only have one view (either view 1(containing States Arizona, Alaska, Alabama) or view 2(containing CA and Colorado)).
But in reality this will grow and so will the view sheets.
I want to see only a specific view for a certain customer, not both of them.
So how do I tell tableau, like if the Report USER selects a customer, then I want to use a case statement behind the scenes
and say if this customer is from California, then select sheet view2 or else select view1.
I want tableau to automatically know which state the customer is from and then show that sheet, based on a case statement.
In future there will be more states and there might be max 4 or 5 views (or seperate sheets).
Each view will have specific set of metrics, but different from other views.
But the views will have metrics only related to a State. For example:
View 1 contains metrics for (AL,AK,AR),
View 2 contains metrics for (CA,CO, WI,WA)
View 3 contains metrics for (HI,IL,ID) and so on.
The problem is I want to show only those metrics for a customer, where the metric is only applicable for his state.
I want the solution to be scalable and not need to have more than 10 sheets for this purpose.
Also the overall does not have to be sheet. I can make it a parameter or a filter and then select the view accordingly.
Hope this makes it clear.
superstore.twbx 605.1 KB
hi geeta, it looks like you might have to do a new calculated Field and use the LOOKUP() function. Show all the Measure names then use the Lookup function to return the ones you need. If you have multiple criteria (multiple states that share same columns) then use a CASE statement
You can nest IF THEN ELSE within the LOOKUP function to determine which fields to show based on the state selected...
then drag this new calculated field to the filter shelf.
Is it possible for you to show how to do the lookup in the book attached?