3 Replies Latest reply on Oct 7, 2016 7:43 AM by Joe Oppelt

    Filter Out Columns In Dashboard When Exported To Excel Using View Data Icon

    Jay Swan

      Tableau : Version 9.3

       

      I have a detail Dashboard with about 50 rows and each row contains multiple information (columns) for different accounts.

      From the 'View Data' Icon after an AccountName is selected, I want only the fields populated to export to excel when prompted.

       

      From The Example Below:

      The Dashboard only displays Field1, Field2 and Field3 in the presentation layer (Key Fields for the user)

      When I export AccountName1 records I only want Field1, Field2, Filed3, Field6 and Field8 to be exported.

      When I export AccountName2 records I only want Field1, Field2, Filed3, Field5, Field6 and Field7 to be exported.

      When I export AccountName3 records I only want Field1, Field2, Filed3, Field8 and Field9 to be exported.

       

       

       

      Example Of The Data:

      Not all columns in the row are associated with all the accounts, as the example below shows...

      AccountNameField1Field2Field3Fieled4Field5Field6Field7Field8Field9
      AccountName1XXXXXXXXXXXXXXXXXXXX
      AccountName2XXXXXXXXXXXXXXXXXXXXXXXX
      AccountName3XXXXXXXXXXXXXXXXXXXX
      .... And So On....

       

      The default behavior is to export all the columns on the row to excel.

      To complicate it further, it's common for the user to 'Ctrl' and 'Shift' Click to select AccountName1 and/or through AccountName34.....

       

      Any thoughts on this one?

      TIA, Jay Swan

        • 1. Re: Filter Out Columns In Dashboard When Exported To Excel Using View Data Icon
          Joe Oppelt

          Can you make a viz to do what you want?  If so, publish that sheet -- just that sheet.  When you open that sheet in Server, you get a URL for it.  Save that URL.  It will look something like this:

           

          https://(your server here)/#/views/ScoreCardExcel/DonationAmountExcel?:iid=1

           

          Chop off the end of the line from the question mark to the end.  Replace that with ".CSV "  so it looks like this:

           

          https://(your server here)/#/views/ScoreCardExcel/DonationAmountExcel.CSV

           

          Then create a little icon-looking sheet and put that on your user's dashboard.  Create a hyperlink action when the user clicks that icon.  Have it open the URL with .CSV added to it.  Tableau will open that sheet directly into excel.

           

          That's the high-level description of the method I've used to control what gets dumped into an excel file.  I don't know of another way.


          But there is more to it.  You want the user's "moused" selections to get passed along as well.  Not sure if that'll work.  When I do the hyperlink excel download, I pass the filter and parameter settings needed to recreate the data selection the user currently has.  I build the URL string in a calc field, and just use the calc field as the URL string on the hyperlink action.  Here is an example string I build:

           

          "https://(my server)/#/views/ScoreCardExcel/DonationAmountExcel.csv" +

          "?Is%20Pledged="+[Is Pledged]+

          "&Period%20to%20View="+[Period to View]+

          "&Fiscal%20Month="+str([Fiscal Month]) +

          "&Retention%20Category="+[Retention Category] +

          "&KMI="+[KMI]

          2 of 2 people found this helpful
          • 2. Re: Filter Out Columns In Dashboard When Exported To Excel Using View Data Icon
            Jay Swan

            Hey Joe,

             

            Thanks for the time and information

            Interesting idea, I was unaware of the '.csv' URL Solution...

            Not sure that is going to work for my user community, as I think it would required an excessive amount of icons to accommodate the export combination possibilities...

             

            I'll tuck this one away for future projects as I was unaware the above could be done...

             

            Thanks Again,

             

            Jay

            • 3. Re: Filter Out Columns In Dashboard When Exported To Excel Using View Data Icon
              Joe Oppelt

              Well the bottom line on your initial question is that we have no control over the way Tableau chooses to format the "View Data" function.