4 Replies Latest reply on Jun 13, 2018 7:09 AM by Jennifer LaPorta

    Dashboard action - how to display value selected

    Jennifer LaPorta

      My dashboard displays a worksheet ("industry hierarchy"). The industry hierarchy displays 5 levels, each one getting more granular. Example in jpeg1.

      I set up a Dashboard Action to filter my second dashboard using the first. Whichever level i click on will filter down the second dashboard for that level only.

      What i would like to do is be able to display on the second Dashboard, in the title or somewhere on the screen, the value i clicked on. So if i clicked on COAL MINING, i want the second dashboard to say at the top "COAL MINING SUMMARY", or if i clicked on CRUDE PETROLEUM EXTRACTION the dashboard's title will say "CRUDE PETROLEUM EXTRACTION SUMMARY"


      is there any way to do this?


        • 1. Re: Dashboard action - how to display value selected
          Joe Oppelt

          If that value is getting passed to the next dashboard, you can certainly display it in the title somewhere on that dashboard.


          So much depends on what you have set up.

          If you upload a sample workbook (or even hack up an equivalent in Superstore) I can help you do what you need.

          • 2. Re: Dashboard action - how to display value selected
            Jennifer LaPorta

            Thank you, I've mocked up something very similar using Superstore

            • 3. Re: Dashboard action - how to display value selected
              Joe Oppelt

              That example helped me see what you are looking to do.  Thanks!


              It wasn't as straightforward as I expected previously.


              Take a look at the Trend sheet.  I made two calcs.  One tells me how many sub-categories were passed to the sheet.  The other tells me how many Products were sent to the sheet.


              FYI, here's what they do.  The EXCLUDE LOD tells tableau not to take into consideration the list of dimensions I tell it to exclude.  (And, essentially, I list all the dimensions on the sheet.)  Just COUNTD everything on the sheet.


              (The way I got the YEAR(Order Date) syntax was simply to drag that pill from COLUMNS into the calc editor.  Tableau is really good at expanding the necessary syntax into your code when you do that.)


              So I added both those calcs to the sheet and displayed them in the title for you.


              Go to Trend(2) sheet.  I made one more calc.  (See [Display token] calc.)  Here I look at the levels backwards.  If I have 1 product, then there will also be 1 sub-category and 1 Category.  The user selected at the product level.  So load that value into the calc.  If not 1 product, then check the sub-category.  Etc.  I dumped this sheet on Dashboard 2 as well.


              One caveat with this.  A wily user could CTRL-CLICK multiple things on the sheet.  Tableau understands that as a multi-select and processes that accordingly.  For instance, scroll down to the last row in Furniture.  Click The last SAFECO row.  Very cool.  You get that one item.  Return to Dashboard 1.  That row is still selected.  CTRL-CLICK on "Safeco Drafting Table".  Two products are now selected.  My calc interprets this as "Tables" being selected since more than 1 product is on the trend sheet.  Now go back to Dashboard 1 again.  Two rows are still selected.  CTRL-CLICK on Office Supplies.


              Here's where trouble occurs.  The two rows from Furniture were selected, and now all of Office Supplies is also selected.  (Same behavior would have happened if you had clicked on the first product in Office Supplies, BTW.)  Now both Furniture AND Office Supplies is getting passed to your action.  Notice that the [Display Token] generates an asterisk.  I didn't account for multiple Categories, and tableau dutifully shoves all the selected categories into the calc, and that generates an asterisk.  You could address that by doing a check on the number of categories (same sort of EXCLUDE calc) and then have one more elseif and display "What the heck did you do here???" 


              Anyway, see attached.

              • 4. Re: Dashboard action - how to display value selected
                Jennifer LaPorta

                this works great, thank you!