8 Replies Latest reply on Apr 25, 2017 8:03 AM by Victor Tomas Perez

    Rank graph evolution from last period by diferent dimensions

    Victor Tomas Perez

      Hi all,

       

      I've been trying to figure out how to do this but I have run out of ideas and didn't find anything similar to this in the forum either. Here is my situation (find attached an example Tableau workbook):

       

      • I have a list of sales and products sold for different companies for each year, city and type of product:

      • I came up with a bump chart to display the 'market ranking' trend of these companies by [Sales]. Filtering by type of product and country, you can even visualize the ranking not only at a general level but for a concrete combination of both dimensions:

       

      This is one of my desired dashboards to display, so until this point, everything is ok

       

      • However, now I need to display in another dashboard for a single company (selected by an individual filter) by country and product (both axis) if they have gained or lost positions in the 'market ranking' compared to last year (it would be great to enable the possibility of choosing which two years the user wants to analyze the gains or losses as well..). This would be de desired representation:

      I have tried it in several ways, however, I dont get to calculate the difference of the ranking positions from one year to another in this kind of table visualization analyzed by 2 dimensions (country & product) and only visualizing it for one company. I'm open to new ideas/ways/graphs for visualizing this information apart from the one in the above image.

       

      Is this even possible? Or is it far too complicated to visualize this information? I know Tableau allows lots of things as some of them I thought were impossible to achieve and finally they were possible.

       

      Thanks,

      Victor

        • 1. Re: Rank graph evolution from last period by diferent dimensions
          mortenbodaugaard.jrgensen

          I would make some comet charts like mine.

           

          I did try to make what you were doing but Table Calculations are not my favorite thing in the world so I went with what I prefer which is a visual approach

           

          • 2. Re: Rank graph evolution from last period by diferent dimensions
            Victor Tomas Perez

            Hi,

             

            Thanks for your answer! It is a very interesting way for visualizing this. However, it's not quite intuitive at first sight.

             

            Is there a more straightforward way to represent that (similar to the last picture I posted)?

             

            Regards,

            Victor

            • 3. Re: Rank graph evolution from last period by diferent dimensions
              Donna Coles

              Hi Victor

               

              I've got this

              What isn't clear to me from your description is whether the ranking is compared across years by country and product (which is what I've done above, so in each year the rank goes from 1-9 due to 3 countries and 3 products) or whether you're comparing across years by country or product (ie ranking each product by country across the years so you get a 1-3 rank or ranking each country by product across the years).  The latter two are below

              To get to this there's a few steps you need to know about. I built up a table with the various columns so you can see how the rank table calc compares to the sales and you've got things 'right'

              You need to set the properties of the rank and rank difference table calcs right to whatever you're aiming for eg the above is ranking the products across the years within each country, so the Rank table calc looks like

               

              and the Rank Difference one looks like

               

              Note the Rank Difference is a 'nested calculation' as its a calculation on a table calc, so you also need to make sure the Rank calculation within the same dialog is set on product (use the black arrow by Rank Difference to show a drop down)

               

              Once I've done all that, I duplicate the sheet and rearrange the pills, and remove pills to just show the data I want.  I simply hide the 2017 column by rightclicking on the column and selecting hide.  This keeps the data in the view for comparison but doesn't display it - if you don't know about this feature it can be a real headscratcher when you're trying to dissect something.

               

              I then change mark type to circle, centred the label and applied custom formatting to the Rank Difference field so you get the +, - or nothing for 0

              A calc field to set the colour was last thing needed which is then added to colur shelf.

               

              Workbook in v10.2 attached with all the data tables & viz for the various combinations.

              Hope it helps

              Donna

              • 4. Re: Rank graph evolution from last period by diferent dimensions
                Victor Tomas Perez

                Hi Donna,

                 

                Thanks a lot for your answer! Visually is what I would like to obtain and the calculations you described are very interesting and helpful. However, I may not have been clear enough in what it is my final objective here.

                 

                What I want is to obtain for each company is the ranking comparision of every product and country (ie: for Videogames in Poland, what we can call a 'sub-market') against the rest of the companies, not the ranking of the different products and countries within a company from one year to another. For example:

                 

                • This would be the ranking (based on the sales) of all 3 companies filtering by Country='Poland' and Product='Videogames' (lets call it the ranking of all 3 companies for the submarket Poland/Videogames):

                  

                • We can see that for my desired visualization, Aliexpress would remain as the market leader (so a '0' should be displayed as the company hasn't changed its market position in this sub-market (Poland/Videogames)), eBay has surpassed Amazon from the 3rd place to the 2nd one in 2017 compared to 2016 so a +1 should be displayed (as eBay gained one position in this sub-market (Poland/Videogames)) and Amazon has lost 1 position (from 2nd to 3rd) so a -1 should be displayed for the same reasons described before. So the table should look this way:

                    

                • So to sum up, what I would like is to visualize for each company if they have gained or lost positions in the different sub-markets (all country/product combinations) compared to the other companies. Your example is a ranking of different sub-markets (country/product) of a single company (how certain products in certain countries have evolved inside the same company).

                 

                I don't know if I explained myself well, if not, please ask me again to clarify anithing yo may need to know. Again, thanks a lof for your time and help.

                 

                Regards,

                Victor

                • 5. Re: Rank graph evolution from last period by diferent dimensions
                  Donna Coles

                  Ok, I've got this now, which I think is what you're after.

                  The numbers don't quite match as you've got as with the RANK function entries with the same value get the same rank, so for video games in Poland I've got both Amaxon & eBay being at rank 2 as they both have sames of 10,000, and there is no rank 3.

                   

                  Workbook attached - see last 2 sheets - one shows the data table with the sales & rank and the rank difference, then the last sheet shows the above.  I don't think you're going to be able to present the data for each company in different tables as per your visual as the calculations are all dependent on each other.

                   

                  Hope I've understood you this time.

                  Donna

                  • 6. Re: Rank graph evolution from last period by diferent dimensions
                    Victor Tomas Perez

                    Hi Donna,

                     

                    That's exactly what I was trying to explain, thanks a lot!! However as you said, I'm not going to be able to display this information for each individual company.. In fact I'm interested to show this information for only one specific company, so I'll put it in the top of the table, and hide the rest with other graphs/text/whatever.. that's the only way I thing I'm going to achieved it.

                     

                    Just one more question. I'm trying to apply this to my real proyect and when I assign the colours to the rank difference, they doesn't match, it's quite strange (some positive values are in red, some negatives in green..). I've tried playing with the table calculations but I'm not able to get it right.. :

                    How can be this happening? What am I doing wrong?

                     

                    Thanks again!!

                     

                    Victor

                    • 7. Re: Rank graph evolution from last period by diferent dimensions
                      Donna Coles

                      Hi Victor

                      Glad I got there for you.  Just double check that your table calc properties on the COLOUR:Rank_Surface_Diff field is set with exactly the same properties as the Rank_Surface_Diff field.

                      Donna

                      1 of 1 people found this helpful
                      • 8. Re: Rank graph evolution from last period by diferent dimensions
                        Victor Tomas Perez

                        I think I finally got it! Thanks a lot for your help.

                         

                        Regards,

                        Victor