3 Replies Latest reply on Sep 7, 2017 12:41 PM by Simon Runc

    How to change the Shape after the linking worksheet has been hidden or shown?

    Michael Ye



      In the attached dashboard, I have added an action. when I click the first "+" sign (actually, it is a worksheet), the "Sales By Month" sheet will be hidden or shown.  My question is, is it possible that when the sheet is hidden, the '+" sign will be changed to another sign, such as a circle (I have built in the circle sheet)? When I click the Circle sign, the sheet will be shown again?






        • 1. Re: How to change the Shape after the linking worksheet has been hidden or shown?
          Jayshree Dawrewar

          Hi Michael,


          I am not able to open the twbx file.

          But are you asking about switching from one sheet to another?




          Jayshree Dawrewar

          • 2. Re: How to change the Shape after the linking worksheet has been hidden or shown?
            pavan hm

            I think , you are trying to open in lower version of Tableau.Try with the latest version of Tableau. It will.




            • 3. Re: How to change the Shape after the linking worksheet has been hidden or shown?
              Simon Runc

              hi Michael,


              So this might be the toughest one yet!!....and although this was a fun puzzle I probably wouldn't advise using this method. It's pretty complicated to set up and maintain, and there's a lot of tough-thought trying to keep track of what the actions are doing and what they are sending what (and the interactions between all those actions)...well it certainly made my brain hurt!!


              I'd just go for a parameter like this (and have it as a slider)



              However, we can (just about) do this with actions....the basic trick is detailed here


              Sheet Swapping using Dashboard Actions (or the Illusion of a Full Outer Join on Blended Data) – The Data Animators


              and a single datasource simpler version here


              Sheet Swap with Action Filters...the simple version!


              In short we create two dummy dimensions with the values 1 and 0, and we send 1 = 0 to kill a sheet, and then use 1=1 to revive it! Sounds simple...



              Action Driven Sheet Swap.gif



              So first I've added the one and zero dimensions to the circle and cross sheet



              Action 1 - Kill the Cross when it's selected (sends the dreaded 1 = 0 to itself...note the Leave Filter on De-selction and we're sending it to the sheet, not the sheet in the dash)


              Action 2 - Show Show Line Chart, when Cross is selected (the zero = zero will become apparent in later actions)



              Action 3 - Kill the Line Chart when the circle is Hit



              Action 4 - When we select the circle, we need this (very odd) action to revive the cross (notice again it's targeted at the actual sheet)



              Action 5 - Once the Circle Revives the Cross...it's reward is to kill itself!



              Action 6 - However not all is lost for the circle, as the cross revives him when selected


              And that it. So you need 6 actions just to create that behavior, and if you want to also send dimensions (such as the Order Group in your original) it gets even more complicated (if fact I couldn't work it out!). It's also a pain to maintain (I created something similar, but with even more clicking for an iPad specific one, where the user wanted to press buttons to do stuff...I ended up with 37 actions, and if I even wanted to add another sheet (which inherit all actions by default) it just took ages to set it all up again!!


              It might be that I've over thought it, and there is a simpler way (would love to be wrong here!!) but this is the only way I could think of.


              Hope that helps, but I'd go with the boolean parameter (or invest in a little D3.js...where it might take a few hours to create a bar chart, but you can get it to do exactly what you want!)

              2 of 2 people found this helpful