1 2 3 Previous Next 44 Replies Latest reply on Jun 14, 2017 7:52 AM by Michelle Ford Go to original post
      • 30. Re: YOY YTD Bar Comparison
        Adam Karolewski

        Thank you ketttan! I need to implement the solution that  will compare current year/quarter/month to analogical period of time in previous periods. And that works for me! Thanks to that solution we may compare also whole periods and partial at the same time.

         

        • 31. Re: YOY YTD Bar Comparison
          Jilles Eissen

          Hi Kettan,

          great post but i am struggling with one piece. I have replicated everything in my workbook. the only thing that is giving me a headache is the following.

          Instead of showing the Average % only for the last year, as in your sheet Calculate Full Year Sales. I get ALL values or None. I have also exactly replicated your Table Calulation.

          kettan.JPG

           

          My table calculation seem not to respond as your on the restarting every instruction. any idea what this could be?

           

          of do I have to do something different to only get the

           

          kettan 2.JPG

          • 32. Re: YOY YTD Bar Comparison
            kettan

            Thanks, Jilles.

             

            I think you refer to  Rebecca's  solution in  Re: YOY YTD Bar Comparison.

             

            I don't know how to answer your question. I never had a professional occasion to learn myself mentioned projected-year-solution and haven't been a Tableau customer for a long time and therefore removed Tableau from my list of things to learn.

             

            I recommend you to attach a workbook with dummy data because it makes it possible for helpers to try to find an answer. This will likely attract several helpers. You might need to post it in  Forums  to get their attention. If you do, please make a link to it in this thread so it also can be found from this thread.

            • 33. Re: YOY YTD Bar Comparison
              kettan

              This post changed my life!!  Thank you!!

              Thanks. Everytime I see this comment, I smile 

              • 34. Re: YOY YTD Bar Comparison
                Jilles Eissen

                I found my mistake

                 

                In Rebecca's example she had 3 years of history. My Dataset only contains two year of history.


                After changing the Lookup to

                 

                ((LOOKUP(ZN([YTD as % of Total COGS]), 1))
                  +(LOOKUP(ZN([YTD as % of Total COGS]), 2))

                )/2

                 

                All worked fine!

                • 35. Re: YOY YTD Bar Comparison
                  kettan

                  Glad to hear! Also thanks for sharing what solved your issue. It will probably sooner or later help someone else who wants to use Rebecca's solutions.

                  • 36. Re: YOY YTD Bar Chart
                    Tristan Grebot

                    Thank you very much kettan, for this workbook.

                    It has been of great use on my latest project. It will definitely be part of my regular analysis toolkit.

                    • 37. Re: YOY YTD Bar Chart
                      Amy Hamilton

                      Hi Kettan, I'm new to the community and looking to do exactly this. I've downloaded the V2a and tried to replicate, however I'm not getting the same results. Is there a "step by step" guide contained here that I'm not seeing? I created the Today Parameter, the Order Data Unified calculated field and the YTD Comparison calculated field... however I think maybe I've missed a step along the way?

                      thanks for your help!

                      • 38. Re: YOY YTD Bar Chart
                        kettan

                        Welcome the the community, Amy!

                         

                        Is there a "step by step" guide contained here that I'm not seeing?

                        Yes, see the 5 animations (gif) in the main message of this thread. Hopefully this is all you needed to find the missing step.

                         

                        Just so you know, I am currently not a user of Tableau. I mention this in the context of being reluctant to use time (hours, days, weeks) on improving the documentation ... even if another part of me would like to present this YTD YOY method in a clearer language. In addition I don't have the most recent version of Tableau but stocked with 9.0. That said, it should be a small thing to help you, but difficult without seeing your workbook.

                         

                        If only a feature like  Show and document how a workbook was built  was a built-in part of the product, then step-by-step guides would always be instantly available! You may influence Tableau to do so by up-voting mentioned idea.

                        • 39. Re: YOY YTD Bar Chart
                          Salil Athalye

                          kettan,

                          Thanks for providing this elegant solution to an often needed visualization!

                          • 40. Re: YOY YTD Bar Chart
                            Srini Ramanathan

                            kettan

                            You are truly the master of YOY YTD. All these different techniques and references and patience to create the gifs, sample workbooks. Best of all, revisiting older posts to add in edits and newer findings. Commendable!!

                            thishelpedme.

                            • 41. Re: YOY YTD Bar Chart
                              arthi.keat

                              This is great kettan.

                               

                              I was looking for a very similar solution but by week. Any idea on we can extend this solution by Week to Date.

                               

                              Thank you for your time.

                              • 42. Re: YOY YTD Bar Chart
                                kettan

                                WOW WTD Bar Chart

                                 

                                Hi Arthi,

                                 

                                I am too tired to explain this (bedtime in my time zone), but hope attached workbook explains itself.

                                 

                                Jóhan aka Kettan

                                 

                                 

                                DateWeekStart

                                DATETRUNC('week',[Order Date])

                                 

                                WTD Comparison

                                IF DATETRUNC('week',[Order Date]) = DATETRUNC('week',[Today]) THEN "Sales WTD This Week"

                                ELSEIF DATEPART('weekday',[Order Date]) <= DATEPART('weekday',[Today]) THEN "Sales WTD Previous Week"

                                ELSE "Sales after WTD"

                                END

                                 

                                Sales This Week

                                IF DATETRUNC('week',[Order Date]) = DATETRUNC('week',[Today]) THEN [Sales] END

                                 

                                Exclude future

                                [Order Date]<=[Today]

                                 

                                 

                                Attached Workbook Version:  9.0

                                .

                                1 of 1 people found this helpful
                                • 43. Re: YOY YTD Bar Chart
                                  Aalok Jain

                                  Looking for something around MoM?

                                  • 44. Re: YOY YTD Bar Chart
                                    Michelle Ford

                                    Wow! This is amazing! Thanks for sharing!! This is way better than what I was going to do! I may even reformat how I visualize my comparisons now. I LOVE that the end user can specify the date for comparison. Way to go!!

                                    1 2 3 Previous Next