1 2 3 Previous Next 71 Replies Latest reply on Nov 17, 2014 12:09 PM by saranya karthi

    String variable

    Vladimir Kostochka

      Hi guys,

      Please help me with an idea.

      I want to add a string variable, which has tags "Bar", "Bubble chart","Pivot Table","Stack char".

      And use this variable for filtering type of chart.

      When I use a parameter, I can see only 1 selection.

      But I want to see all of them.

      How can it be done?

      Thanks,

        • 1. Re: String variable
          Justin Emerick

          Vladimir,

           

          I do this kind of activity in many of my dashboards. Here is how I perform this.

           

          1. Create a String Parameter that is a list with your values in it.

           

          2. You need to create an calc field on the values in the parameter.

           

          The calc is the same in each one.

          case [ParameterName]

          when "Bubble" then 1

          when "Bar" then 2

          when "Pivot Table" then 3

          else 0

          end

           

          3. Create a worksheet that has each type of viz. Drag your calc field in the filters area (In the filter prompt, use "custom value list")

          Type the numeric value associated to the viz type ie: on your bubble chart make the filter value 1.

           

          4. In your dashboard, drag in each of your worksheet viz so they are stacked on top of each other. From any one of the worksheets, show the parameter control.

           

          The basic principal here is that only 1 worksheet at a time will meet the filter criteria of your calc field. This will make all other worksheets show no data (they'll disappear) and only the viz you select in the parameter will show.

           

          Best,

           

          Justin

          • 2. Re: String variable
            Justin Emerick

            Vladimir,

             

            I missed the part of your question about "I want to see them all" you Can take my suggestion above and include an "All" value. Eidt the filter calc and filter criteria accordingly to show either one viz type or ALL.

             

            Justin

            • 3. Re: String variable
              Vladimir Kostochka

              Hi Justin,

              There is no any trick to have image-trigger of each type of chart.

              I'd like to add shapes for calculated field by your suggestion.

              I think the Tableau is limited for tricks.

              Please find the attached example.

              Thank you,

              • 4. Re: String variable
                Matt Lutton

                Tableau is only limited by our imagination and our data structure...  I would argue that if anything, there are more tricks than any one person can keep track of.  It takes study, practice, and application of new knowledge -- as well as a general understanding of how Tableau works to be able to utilize a lot of the "tricks" available in Tableau.  These tricks can be very simple, or very complex, depending on the end goal of a view and how your data structure supports that.

                 

                It is important to try and clearly communicate what you're attempting to do when using this Forum--I am not clear on your end goal based on this workbook example you've posted, and the text that accompanies it.  There are three sheets, and I'm not sure what sheet I should look at, or where I should focus my attention.

                 

                So, what is it you are trying to accomplish in this workbook?  Please provide as much detail as possible so helpers can provide the best help possible.  Justin answered your initial question with accuracy, so I'm not sure if this is supposed to be related to that original question, or if this is an entirely new problem you're trying to solve.

                 

                If you can explain what you're trying to accomplish in more detail, and perhaps provide a mock up of your expected results, I'll be happy to take a look.

                 

                I'm mostly confused by these statements:

                There is no any trick to have image-trigger of each type of chart.

                I'd like to add shapes for calculated field by your suggestion.


                Please add some details about what you mean here, and how this workbook you've posted exemplifies the problem you're encountering.

                • 5. Re: String variable
                  Vladimir Kostochka

                  Hi Matthew,

                  I want to add the images below

                  Capture.PNG

                  By clicking to one of this image, change style of report. (bar, stack chart, Table , ...)

                  The attached file was for trying to make trigger.

                  You can create any sheets with bar chart or whatever. I'm interested in an idea how to use image for trigger.

                  IF IT'S POSSIBLE?

                  Justin suggested to use parameter -> calculated field.

                  Calculated field shows only what I selected in the parameter.

                  Cheers,

                  • 6. Re: String variable
                    Matt Lutton

                    http://vizpainter.com/sheet-selection-on-steroids/

                     

                    The above link is the only one that I think comes close to what you're looking for, but it'll take time and effort to build, as well as an understanding of how Action Filters and sheet swapping works in Tableau.

                     

                    I could see a potential solution with 6 sheets that each show a custom shape for each of the images above, and passing a filter via a click action to swap sheets accordingly.  You might be able to do this in one sheet, but you'd need a dataset to support that (a dataset that has a dimension for "Chart Type" and that dimension would have 6 values: Bar, Bubble, Color Pivot, etc.  Then, you'd need a custom shape (image) for each Chart Type, and you'd need to pass an action filter from those custom shapes to swap in a new worksheet.

                     

                    I certainly don't have time to try this out, or try to build an example on the fly--perhaps Ville Tyrväinen has an idea on how he might do this, or will have the time to build a simple example?

                     

                    I would go back to the original goal:

                    If the goal is to switch views based on a user selection, the easiest method will be to use a Parameter, as Justin suggested.  It may not be worth the effort to try and build something else...    but its certainly possible. 

                    • 7. Re: String variable
                      Ville Tyrväinen

                      It's doable

                      • 8. Re: String variable
                        Matt Lutton

                        Oh, definitely doable.  But is it worth the effort, thats the question?  I sure don't have the time to build such an example, and probably never would in my own work, since I am usually fine with a String Parameter.

                         

                        If I find the time, I'll try to build a simple example.  But don't count on it.

                        • 9. Re: String variable
                          Matt Lutton

                          Here's an example of how you'd start the process, Vladimir (using Custom shapes on a sheet) -- from here, you'll need to find a way to pass an action filter to swap sheets.

                           

                          Chart Types on Custom Shapes.png

                          This may help if you've never done Custom Shapes for a dimension before--I created a text data source with a single column to build the sheet you see in the screenshot above:

                          http://www.tableausoftware.com/public/blog/2013/10/creating-and-utilizing-custom-shapes-2171

                           

                          Again, I am not suggesting this is good practice -- but what you want to do IS possible; it just takes a lot of "little tricks" to get to the end result you want. 

                          • 10. Re: String variable
                            Vladimir Kostochka

                            Glad to hear it.

                            Could you help me create the images?

                            Should I use parameter or I can load separated excel file?

                            Thanks,

                            • 11. Re: String variable
                              Ville Tyrväinen

                              Biggest job is to create those pictures, rest is quite fast to do

                              • 12. Re: String variable
                                Joe Oppelt

                                Vladimir -- I did a crude stab at what you need to do.  See attached.

                                 

                                You don't want to display the calc field as the filter.  You want to display the parameter.

                                 

                                Create a  separate sheet for each viz you want.  In the filter for each viz, determine the condition you want that will trigger the display of the viz.  In this case I did one sheet for value 1 and one for value 2.  (None for all the rest.)  Place the sheets on a dashboardby following the video for swapping and popping sheets here:

                                 

                                We made a video of Sheet Swapping and Legend/Filter Popping on a dashboard.

                                 

                                If you want to have the various icons at the top as the trigger for each viz, you can do that too.  Maybe you can have an action to display the corresponding viz, or select for the field value that will be underlying the custom shape you'll place on each of those little icons (each will actually be a dummy sheet.)

                                • 13. Re: String variable
                                  Matt Lutton

                                  I just cropped pieces of his original photo--takes a few minutes...      Now, someone finish it off.

                                   

                                  I would try to build it using one sheet as the Source, rather than separating out each Chart type into a new sheet -- I think it is possible to do it either way, it just depends on the data source(s) you use in the viz.  I created a data source to support the one sheet with multiple "chart type" images as Custom Shapes.  Would love to see the final solution applied!

                                  • 14. Re: String variable
                                    Joe Oppelt

                                    Maybe those pictures could be images, and then place dummy sheets over top of the respective images.

                                    1 2 3 Previous Next