11 Replies Latest reply on Feb 18, 2020 11:26 AM by Mike Di

    Button swapping technique makes all other marks disappear

    Mike Di

      Has anyone tried this button swapping technique?  https://playfairdata.com/how-to-do-button-swapping-in-tableau/

       

      The technique works when I create the set action. If you click the deselected image on the worksheet it will change to the selected image. But I also have a regular filter set on the worksheet to filter all other sheets on the dashboard. When I click the deselected image it makes all the marks on the dashboard disappear. Does anyone know why? I have not placed the set on the other worksheets. There is a common measure on all other worksheets that is a count of an ID field. Other than that they include different dimensions.

       

      EDIT:

       

      I just uploaded a sample workbook that replicates the issue. This uses a set action on sheet 1. If you look at the dashboard and click the red circle you will see that the circle changes to a filled selected state but all of the data disappears. The ideal behavior is if you click the circle it will filter the other sheets and change to the filled red circle. When you click the circle again to remove the regular filter it would change back to the non-filled deselected circle.

        • 1. Re: Button swapping technique makes all other marks disappear
          Bryce Larsen

          Hi MIke,

          If you're able to attach a sample workbook illustrating your issue we'd be happy to take a look!

          Curious if set action is set to remove all values or something similar.

           

          Best,

          Bryce

          • 2. Re: Button swapping technique makes all other marks disappear
            Mike Di

            Unfortunately I can't upload this one. The set action is set to remove all values so that it switches back to the deselected image. If I change it to "add all values" it filters the dashboard properly but then the image remains in the selected state.

            • 3. Re: Button swapping technique makes all other marks disappear
              Mike Di

              Maybe this technique doesn't work if you have to remove all values from the set.

              • 4. Re: Button swapping technique makes all other marks disappear
                Mike Di

                I'll try to create an example with superstore data later tonight and see if I can replicate the problem.

                • 5. Re: Button swapping technique makes all other marks disappear
                  Bryce Larsen

                  Hi Mike,

                  What if you did Keep set values? That's the approach Ryan went with his Dashboard and should resolve your issue.

                  You could also look at using Parameter Actions instead if you're on 2019.2 or newer. Looking forward to seeing the sample if the above doesn't work.

                   

                  Best,

                  Bryce

                  • 6. Re: Button swapping technique makes all other marks disappear
                    Mike Di

                    If I keep set values then everything disappears on the first click. If I deselect and select the mark again everything comes back and filters properly, but then the mark remains in the selected state when you deselect. I thought about parameter actions but I'm not sure how I would do this with parameter actions.

                    • 7. Re: Button swapping technique makes all other marks disappear
                      Mike Di

                      Hi Bryce,

                       

                      I just uploaded a sample workbook that replicates the issue. This uses a set action on sheet 1. If you look at the dashboard and click the red circle you will see that the circle changes to a filled selected state but all of the data disappears. The ideal behavior is if you click the circle it will filter the other sheets and change to the filled red circle. When you click the circle again to remove the regular filter it would change back to the non-filled deselected circle. I hope this behavior is possible in Tableau in some way. The dashboard I created is being viewed by people who have never interacted with Tableau dashboards before. I need to make it really clear that the sheet acting as a filter has been selected so they don't forget that they are filtering on that sheet. I have other ideas for solving this problem but this seems like the best one if it can work.

                      • 8. Re: Button swapping technique makes all other marks disappear
                        Bryce Larsen

                        Hi Mike,

                        I think the issue is you have an additional filter action on it. You should be able to simply use the Set Action and filter with the Set on the other sheets.

                        I duplicated your Set and have the original "Remove All Values" and the copy "Add All Values".

                        As such, clicking on the Segment circle fills the ring and then the Set copy filters the other 2 sheets. Unselecting add all segments back to the Set copy so it shows the entire Sales/Order Quantity.

                         

                         

                        Clicking:

                        Please see attached and let me know if this is what you were looking for.

                         

                        Best,

                        Bryce

                        • 9. Re: Button swapping technique makes all other marks disappear
                          Mike Di

                          EDIT: So, it looks like it almost works for me. When I first read your explanation I didn't realize I needed to add both the remove and add set action. When I did that it switched the icons and filtered properly on the bar chart. The real workbook is pretty huge and has a lot of other actions. The circle in the real workbook actually had two original actions. One was the basic filter action and the second was a menu action that takes you to a second dashboard to see subset data (one of 4 subset dashboards). When I click the circle, after applying both set actions and not removing the menu action,  is takes me to one of the other data subset dashboards. If I go back to the main dashboard and deselect the icon I can see that the set action is working properly. But I don't understand why the circle now goes to the other dashboard as if there was a GoToSheet action set on the sheet.

                          • 10. Re: Button swapping technique makes all other marks disappear
                            Bryce Larsen

                            Hi Mike,

                            I felt we needed two sets due to the nature of the desired behavior. You wanted one to show all values after deselecting, I presume - as to show everything in the bottom sheets after deselecting.

                            If we did this in one set with the set action, then after deselecting, the circle would become full as it would be TRUE again. So for the original set I kept it as remove in order make the circle empty again.

                             

                            Does this make sense? This way I can also just put the Set as the filter on the other sheets. Unsure how it doesn't filter the bar chart properly as you've stated. Can you elaborate?

                             

                            Best,

                            Bryce

                            • 11. Re: Button swapping technique makes all other marks disappear
                              Mike Di

                              It works now! The real workbook has a few extra dashboards with subset data that are accessed by menu actions. There were filter actions set on the circle to filter those dashboards. When I removed them and placed the set on the worksheets from those dashboards it worked. Thanks for your help!