10 Replies Latest reply on Apr 21, 2017 3:18 PM by Manjot Singh

    Wrap the horizontal axis?

    Manjot Singh

      I have a very simple sheet with just one dimension on the columns shelf. It has lots of values, so naturally there is a horizontal scroll bar which we can use to view all the records.

       

      Is it possible to wrap those values around so that I can use the vertical space to view all the records at one instance, or possible have a vertical scroll bar if there are lots of records?

       

      Here is what I have:

       

      Current.JPG

       

      And I am looking to do something like this, but along with a vertical scroll bar to display all the records (not all the values are currently visible on the image) :

       

      Need.JPG

       

       

      Is this even possible somehow using some hack or trick? Thank you

        • 2. Re: Wrap the horizontal axis?
          Michael Hesser

          Hi Manjot;

          Can you provide some additional detail (perhaps through a .TWBX)?

           

          Questions I have:

          • Are you concerned with the name column name wrapping?
          • Is this more an issue with the number of column names?
          • Do you have flexibility in your view, meaning could you flip the chart and make your names rows instead of columns? I think this could make your viz much easier to read and might just solve your problems.
          • What values are represented by the blue squares?

           

          Thanks for your feedback! --Michael

          • 3. Re: Can we wrap the horizontal axis so that we don't have to scroll across to see all the values?
            Justin Larson

            A couple thoughts.

             

            1) if your labels are less important than the marks, you always have the option of setting view to Entire View

            2) You could come up with a calculation that assigns a row number to each element in your product name, then throw that calc on the row shelf as discrete. This could be as simple as a case statement, if you want to go through them all

            case [Product Name]

            when 'Puppies' then 1

            when 'Kittens' then 2

            end

             

            If you want to get really fancy, you could make it dynamic with window calculations. Off the top of my head I made an INDEX() calculation computed along product name, and called it product Id. Then I made a calculation int([ProductId]/20) and put on row. This creates a new row every 20 products when ProductId is on view and both are calculated along ProductName

            1 of 1 people found this helpful
            • 4. Re: Wrap the horizontal axis?
              Manjot Singh

              Justin

               

              I believe the last part of your answer is what I am looking to achieve. I don't understand the part "made an INDEX() calculation computed along product name". I tried looking up index calculation but all I am getting is that it returns the row number. It would be great if you can provide the workbook, or point me towards any resource that would help me better understand Index() function and table calculations in general.

               

              Thanks a lot.

              • 5. Re: Wrap the horizontal axis?
                Justin Larson

                the formula is just

                 

                INDEX()

                 

                if you bring this into view (along with Product Name) and right click on it and select "Edit Table Calculation", you will see a window like this:

                select compute using specific dimensions, and check off Product Name. This will assign a new number to each productname in your view. Then you can modify this with whatever math you'd like. my example divides by 20 and takes the integer, resulting in up to 20 columns. You could do whatever manipulation you'd like, perhaps the modulo operator would be more appropriate:

                 

                INDEX() % 20

                 

                would set the number of rows at 20

                 

                see attached.

                • 6. Re: Wrap the horizontal axis?
                  Manjot Singh

                  Justin

                   

                  I have implemented this but when I now try to use Action Filters on them, the organization of the entire sheet goes into disarray. Also, adding some color dimensions also put view a little off. Is there any way to solve this?

                   

                  Thanks for providing the detailed explanation, and also for the workbook.

                  • 7. Re: Wrap the horizontal axis?
                    Justin Larson

                    It's almost certainly the interaction with that index() function. That is a window function, which is responsive to what pills you have on the view.

                     

                    Without more details on your dataset and visualization, I'd have a hard time getting specific answers as to what's going on. Is this a workbook you can package and share?

                    • 8. Re: Wrap the horizontal axis?
                      Manjot Singh

                      Justin

                       

                      There is only one issue that I have, I hope I can explain it well enough here. When I drop a field on the Color card, the index() calculation gets modified to become local based on colors. For example, if I drop a field with 5 distinct values on the Color card, the index() no longer returns global values, it returns upto 5 multiples of the same values. Thus, messing up the image organization. Is there any way to fix this?

                       

                      I really appreciate your help.

                      Thanks

                      • 9. Re: Wrap the horizontal axis?
                        Justin Larson

                        Hmm. Yes. Index may have been ill-suited beyond initially simple sample.

                         

                        It's pretty hard to say specifically which buttons to press in your case, as window calculations are context sensitive. The results they display will respond to what's on the view, so dropping in new pills effectively changes level of detail in the view, which impacts the window calculations.

                         

                        If you are dropping something onto color shelf and more marks are being drawn, then it's because there are more than 1 [your color dimension] related to the product on the canvas that is currently represented as a single mark. If you color by sum([Number of Records]), for example, it shouldn't change the view.

                         

                        If you right click the field that you are currenlty dropping to color, and on release choose the last option ATTR([your field) - what happens?

                        • 10. Re: Wrap the horizontal axis?
                          Manjot Singh

                          Justin

                           

                          I tried changing the field that I am dropping to ATTR, but it was resulting in a fewer number of records. But then I selected it as a Minimum Measure, it worked like a charm.

                           

                          I really appreciate your help, Justin. You are a rockstar.

                           

                          Thanks