1 2 3 Previous Next 33 Replies Latest reply on Jun 11, 2015 2:25 PM by Tyler larsen Go to original post
      • 15. Re: Top n vs the rest
        Phillip Marsh

        As all the posts have said this is very very cool stuff.  I am still learning this but I have a question.  If I wanted to do add dates, say year / quarter / month how do I keep the sorts. do I create the set to include the date?

        For Example, the the above attached "topnvsothers_test_0_im_edit" when I add Docdate and display month to the row shelf everything is nicely broken down by month.  However, when I slect the "show all vendors" I can see the other items but notice that in January the "T-shirt L/S" and "T-Shirt Tank Top" subcode items should be in the top four but are not.

        • 16. Re: Top n vs the rest
          Phillip Marsh

          As all the posts have said this is very very cool stuff.  I am still learning this but I have a question.  If I wanted to do add dates, say year / quarter / month how do I keep the sorts. do I create the set to include the date?

          For Example, the the above attached "topnvsothers_test_0_im_edit" when I add Docdate and display month to the row shelf everything is nicely broken down by month.  However, when I slect the "show all vendors" I can see the other items but notice that in January the "T-shirt L/S" and "T-Shirt Tank Top" subcode items should be in the top four but are not.

          • 17. Re: Top n vs the rest
            Joe Mako

            You are correct, you will need to adjust the Set. This will be similar to the way that "Type" was accounted for in the sorting and visual grouping. Here are some steps:

             

            1. create a calc field for "Month", like:

             

             

            DATENAME('month',[Docdate])


             

            2. duplicate "Month" so you now also have "Month (copy)"

            3. create a Set from the three dimension fields "SubCode", "Type", and "Month"

            4. remove the old Set and replace with this new Set, you will also have to specify this as the compute using for the table calc pills, and the sort for this Set pill and the sort on the "In Top n" pill

            5. add "Month (copy)" to the Rows shelf.

             

            I added another calc field to the attached to sort the subcodes that fall under others when you show all.

            • 18. Re: Top n vs the rest
              David. Lewis

              Joe, et al:  General comment on the new Tableau 7 release -- I read through the pdf on it quickly, and it appeared that it includes new functions that make all this simpler.  I haven't yet tried it out to see what part of your approach is simplified, though...

              Every time I come back to this I appreciate it anew.  Really neat.  You know your way around table calcs!  d

              • 19. Re: Top n vs the rest
                Joe Mako

                David, the option that you are referring to in version 7 does not have the "Condense others" option, it is just a Top n filter, where "n" can be a parameter. Also you will still have to use a Set if you want to sort within multiple levels of dimensions, and you still need to set other normal filters to be Context filters to ensure the ordering other filters is applied correctly.

                • 20. Re: Top n vs the rest
                  Phillip Marsh

                  Thanks Joe!  I can only hope that one day we can help you a fraction of how much you have helped all of us.

                  • 21. Re: Top n vs the rest
                    David. Lewis

                    Joe:  thx.  Here is a more general question for you, and perhaps for other Jedis/Tableau Team people:

                    How on earth did you learn how to do this?  There were about 15 steps, if I recall correctly, and not a one of them was 'intuitive'.  How did you put it all together?  How did you break down this problem into manageable pieces?  d lewis

                    • 22. Re: Top n vs the rest
                      Joe Mako

                      David, for myself, I learn, and am still learning, Tableau mainly by participating on the forum here, connecting with some of the other users here, and with our conversations and sharing of our trials and errors, we compare notes and gained an understanding of how to approach data with Tableau, and how to work within the constraints Tableau provides to get the results that we want.

                       

                      Every time I attempt to help someone on the forum, or try to explain something, or have a conversation with another user, I learn a little bit more about Tableau. After that it was just time and persistence, and passion and in my case, a little bit of obsession :) Eventually things 'click', and you too will be able to create things like this from scratch.

                       

                      Also I would love to talk with anyone that wants to talk about Tableau, I will gladly share any knowledge I have, or answer any questions, you are welcome to contact me via http://gplus.to/joemako if the forum is not an effective medium (I regularly have Skype screen sharing sessions with other users).

                      • 23. Re: Top n vs the rest
                        David. Lewis

                        I guess the short answer is 'hard work' :)  I  probably knew it before I asked.

                        Thanks for the offer -- I may take you up on it. 

                        • 24. Re: Top n vs the rest
                          Rick Chang

                          Joe, thanks for the example, it is very cool and has helped us to solve one of our nested Top N problem. It turned out the we needed to "a duplicate of the top level dimension". I think David asked the same question before and there was no response in the thread, so, can you or someone please clarify "why do you need to duplicate the top level dimension?"

                          • 25. Re: Top n vs the rest
                            Joe Mako

                            There are few routes to achieve these same results. I route shown in this case uses a set of both dimensions in use, the set has sorting applied to it, and the table calcs use that set for their compute using. I add a duplicate of the dimension I want to partition on, causing the ranking to restart.

                             

                            You may think that this is the same as an Advanced Compute using with the "Restarting every" option, but it is not. The "Restarting every" option is more like only increment when change and use first sighting.

                             

                            The other thought you may have is just apply sort to the inner dimension, and just us the inner dimension for Compute using, but that will just sort on the inner irregardless of the top dimension. This will only work when your dimensions are an exclusive hierarchy, meaning each distinct inner dimension only exists in one top dimension.

                             

                            The duplicate forces a partition, causing a true restart.

                            • 26. Re: Top n vs the rest
                              David. Lewis

                              Hi Joe:  Do you have any idea why in my application of this method I end up with the results being sorted alphabetically by database? 

                              In my data the database-environment equivalent is Item-Type, with item being more granular.  I have everything working fine, with the exception that the rows stack up not according to Display Value DESC, as in your example. 

                              I guess another way to put is my Display Rank pill is not having the desired effect of sorting the rows by value, rather it seems to do it by "Item".  Also, I note that my "In Top N" calculation, when I click on its pill on the row shelf, only displays 'True' as possible values, whereas in your example both 'true' and 'false' appear.  I I can post a stripped down version if no answer occurs to you off the top of your head.  Many thanks.  David

                              • 27. Re: Top n vs the rest
                                David. Lewis

                                Dang!  I went through it all once again and found the issue(s).  There were a few -- somehow the pills tend to lose their Calculate Using... setting, and I have to keep my eye on them.  Also, in the Level of Detail shelf there is a sort, and that is also key... thx for reading. d

                                • 28. Re: Top n vs the rest
                                  Rick Chang

                                  Thanks, Joe.

                                  • 29. Re: Top n vs the rest
                                    thierryjakircevic

                                    Fantastic post!

                                     

                                    It helped me to (almost) solve a similar issue but I am stuck towards the end.

                                    In the attached workbook, the values for each of the 2 records in the "Others" category are still displayed individually. How can I get them to be aggregated and display 36%?

                                     

                                    Thanks!