4 Replies Latest reply on May 25, 2017 12:09 AM by Manjot Singh

    Place different shapes for different dimensions on the View

    Manjot Singh

      Hello everyone


      I have attached the workbook where I am using the Sample - Superstore dataset to display a list of products per city. The products are displayed as Square shapes with accompanying labels, and I have limited the number of products per row to 20 using the Index() table calculation. Here is an image of what I currently have right now:



      Now, I want to do three things here:

      i) Increase the horizontal distance between the shapes. Currently, I know that I can use a custom shape to increase the horizontal distance but I want to know if there is another method to do this by using another table calculation.


      ii) I also want to use another shape to represent the City dimension here. Is this possible?


      iii) I also need to display an accompanying label for the City dimension as well. Any help regarding how to achieve this?


      Any suggestions regarding these will be very helpful. Anything


        • 1. Re: Place different shapes for different dimensions on the View
          Sujay Paranjpe

          Hi Manjot,


          1. Use the Size Card Slider to reduce the size of your shape. This will incrases the space between consecutive shapes/marks.

          2. You need to use dashboard. You need to use the above sheet along with a new sheet with just city name dimension on row shelf. You need to then drop the city name on shape card and assign required shape to your cities.

          3. Drop the city name dimension on the Label card.




          If this post assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

          • 2. Re: Place different shapes for different dimensions on the View
            Manjot Singh



            i) Reducing the size of the shape does not increase distance between consecutive shapes in my scenario because I am not dropping Products on to Rows or Columns Shelf but I am dropping it on the Detail Mark.
            EDIT: Need to do this because I need the table calculation working here for the placement of shapes.


            ii) Cannot use dashboard since there are lots of cities, there will be a vertical scroll bar, and hence cannot scroll them both together. Also, the vertical size of the City rows in some cases will not be in sync with some of the corresponding Product rows, which will throw the entire organization into disarray.


            iii) Cannot use this because I cannot use dashboard here. See point (ii).


            Thanks a lot

            • 3. Re: Place different shapes for different dimensions on the View
              Jonathan Drummey



              Some quick thoughts:


              i) You are using Tableau's "non-cartesian" layout (i.e. no green pills on Rows or Columns) to place the shapes, this gives very little control over placement. You'll need to do some more math to create continuous pills for columns and/or rows to exactly place the shapes.


              ii) The City headers are created by the city dimension, they are not marks (and therefore not something we can assign a mark type to). If you want those to be shapes as well there are three options that I can think of: 1) Use a dashboard (which you've already ruled out). 2) If the shapes are actually characters from fonts then just use custom strings instead of text for headers. 3) Otherwise you'll need to structure the data so your "headers" can be additional shapes on the same axis or a dual axis.


              iii) If you are using shapes for the City dimension then you can have multiple pills on Label or a longer string for the label. If you are continuing to use the discrete header then you could use a longer string for the label, a calculation like [City] + CHAR(10) + [Extra field] creates a longer string with a newline.



              • 4. Re: Place different shapes for different dimensions on the View
                Manjot Singh

                Thanks a lot Jonathan, again, for your very valuable input.


                Regarding point 1, you said I would need to do some more math to get it working. I am thinking about it, and can't seem to visualize what kind of math I would need to do in order to get it working.


                One way I can think right now is create a field in the source data, which has a number assigned to each of the products (square shapes), and then place it on the Grid, it will give me control over the placement, but then, if I would apply some filters, in most of the cases, the shapes not be aligned to the left. I am thinking it would definitely need some kind of table calculations to get the order right.


                And let's say, if somehow I am able to control the placement of the product shapes (squares) using table calculations, then do you think I would be able utilize multiple marks to get the City Shape working in conjunction with the Products shapes somehow?


                I would be very thankful if you would care to give some more thoughts, or provide me with some brief hint regarding what kind of 'math' I am looking at here, so that I can try working on it.


                Again, thank you very much. Really appreciate yours, and everyone else's help here.