4 Replies Latest reply on Dec 7, 2017 11:04 AM by Joe Oppelt

    Calculated Field for Current Dashboard

    Dan Fasciano

      Hello, I'm using Tableau 10.2. I don't know if this is possible, but is there a way to have a calculated field that is based on the currently loaded dashboard?


      So if there were three dashboards on the field, the calculated field would output "Dash 1" on Dashboard 1, "Dash 2" on Dashboard 2, etc.


      I'd like to use this to make a custom tabbed solution, which would highlight the currently selected tab, and this way I can make all the tabs in one sheet, instead of two sheets per tab, like in this example: Custom tabbed navigation in tableau | BI HAPPY


      Thank you

        • 1. Re: Calculated Field for Current Dashboard
          Joe Oppelt

          I can't get to the link you posted, so I'm not sure what you are looking to achieve.

          In the attached I have a quick example of creating a calc that tells you what dashboard you are on.



          For a calc to do this, it has to be data driven.  The message has to be derived from the data on the sheet.  I did this with a very small excel file (also attached.)  That way you don't have to have special data in all your rows of your actual data source.  (Unless, that is, each dashboard contains some unique data, in which case you can build your calc based on what data is on that dashboard.)


          The attached is in V10.1, so it will open in 10.2 for you.

          • 2. Re: Calculated Field for Current Dashboard
            Dan Fasciano

            Hi Joe,


            Thank you for the feedback. I'll need to take a better look at your solution to see if it works for what I'm trying to accomplish.  Either way, I figure I'll explain a little.


            Basically, I am trying to add my own tabs, which would be a sheet of shapes ("buttons") along the bottom of a dashboard, where clicking on label will open up the resulting dashboard, however I also want the currently selected dashboard to be highlighted.




            In the  linked solution, a dashboard is created for each button, so there would be dash1_selected, dash1_unselected, etc. Since my workbook has a lot of dashboards, it would add a good amount of work to the process. So, my ideal solution would be to add a excel sheet that lists each desired tab, and plot them all on the same line chart, and the purpose of the dashboard name calculated field would be used to determine the shape for each button (since selected would be a shape, and unselected would be a shape). Then I'd have to figure out how to get the actions working to switch tabs in this circumstance.


            I hope that makes sense, and thank you for your help!

            • 3. Re: Calculated Field for Current Dashboard
              Joe Oppelt

              At first thought, I would have the buttons, but they wouldn't need to have a calc that says what dashboard I'm on.  You'd have three little button sheets at the bottom of each dashboard:  Go to D1/D2/D3.   But you would actually just display two on each dashboard (the two for the dashboards you are NOT on.)  And for the current dashboard just have a text box or an image that says where you are.  And that respective object would be prominently displayed, essentially saying "You are HERE!"  Because you don't need an operational button on Dashboard 2 to go to Dashboard 2.  You're already there!

              • 4. Re: Calculated Field for Current Dashboard
                Joe Oppelt

                And the problem with selecting and deselecting the buttons has a solution.  (If you click "Go To 2" when you are on 1, and then when you go back to 1, you find that the button is still selected, and you have to click it to deselect it.)


                Check out this link:


                Never Ending Navigation: Buttons that Deselect Themselves – VizPainter


                I've used this technique a lot, and this is a really nice description that Joshua wrote up on how to do it.


                And since you will actually have three (or more?) buttons going back and forth, I actually worked out a method to apply it to multiple dashboards instead of just the two-part back-and-forth solution described in the linked article.