4 Replies Latest reply on Mar 18, 2016 8:12 AM by Rody Zakovich

    Unable to perform Lookup Function : (YOY sales comparison)

    Rajeev Pandey

      Dear Tableau Gurus,

      Could u please help me in solving the below issue.

      Problem : YOY sales should come when user only select one value from the Order date . i.e Up and Down Error should appear on top of the bar chart even when user  selects one Year. For example: When User Select 2014 checkbox (in other words, it should be single select dropdown) then Sales comparison will happen between 2014-2013 . I don't know in this type of case how  to use Lookup function.

       

       

      I tried with parameter but not able to succeed. Any help would be appreciated

      Expected output :

      Rody Zakovich Pooja Gandhi Simon Runc Jonathan Drummey : Is there any possibility we can perform Lookup by using the Perimeter .

        • 1. Re: Unable to perform Lookup Function : (YOY sales comparison)
          Rody Zakovich

          Hey Rajeev,

           

          You could add additional logic to your calcs to determine whether of not to display the Up/Down arrows.

           

          I Would do something like

           

          IF SIZE() > 1

          THEN [Your Up/Down Arrow Calc]

          END

           

          You'll need to make sure that SIZE() is computed on Year, but keep  [Your Up/Down Arrow Calc] set to the same addressing/restarting as you have.

           

          Basic ex.

           

           

          Now with only one year selected.....

           

           

          Hope that helps,

           

          Regards,

          Rody

          1 of 1 people found this helpful
          • 2. Re: Unable to perform Lookup Function : (YOY sales comparison)
            Rajeev Pandey

            Dear Rody,

             

            This is not what I am looking for . What I want when User select only one date from the Order date say 2014 then YOY comparison should occur 2013-2014 .The Problem what I am facing here , when User selects the only one year I am not getting the Arrow sign on top the bar because there is no previous value to lookup. In other way i can say, suppose I created a order perimeter and when user selected only 2014 from the dropdown then even having 2014 data in the view calculation should happen in the entire result.

            • 3. Re: Unable to perform Lookup Function : (YOY sales comparison)
              Rajeev Pandey

              1)Created three calculated Field :

              Year Wise Sales

               

              2) YoY over

              3) % of Sales

              After We need a arrow for the result

              Then the Final result will look like this,

              • 4. Re: Unable to perform Lookup Function : (YOY sales comparison)
                Rody Zakovich

                Hello Rajeev,

                 

                Instead of using a Parameter (Which limits what you can filter)

                 

                You could have used a Table Calc filter, i.e.

                 

                LOOKUP(MIN([YEAR]), 0)

                 

                Table Calc filters are computed last in the pipeline. This allows you to "Filter" without losing context of the calculations happening earlier (Like you Up/Down Calcs)

                 

                But, it works the same as a filter in the sense that it supports multi-select

                 

                Ex.

                 

                 

                 

                 

                 

                See how the Running Sum values remain the same, even though we are no longer showing the previous years?

                 

                 

                This gives you some additional flexibly in how you can use Table Calcs, but still "Filter" a dim.

                 

                Regards,

                Rody

                1 of 1 people found this helpful