2 Replies Latest reply on Nov 29, 2016 11:58 AM by Yingying Zeng

    YOY by Index Parameter

    Yingying Zeng

      I tried to practices parameters for difference cases and have question for the YOY calculation by Index.

      In the attachment YOY tab, the YoY is determined by the below calculation and here are my questions.

      1. What does" ==" mean? any difference between == and =?

      2. Anyone can explain  more to me how the below index formula solve the YOY problem? for example, what is the result of

      "IF MIN(YEAR([Order Date]))=[YoY] Then INDEX()







      Index()==(IF MIN(YEAR([Order Date]))=[YoY] Then INDEX()


        • 1. Re: YOY by Index Parameter
          Walt Reed

          Hey Yingying

          I will attempt to answer your questions:

          1. From what I can find, there is no difference between == and =. If you change the formula for Year Over Year, it does not impact the viz.

          2. This is a logical formula that filters out the years not selected in the YoY parameter. First, the INDEX() assigns the value of the row in the partition. So if you put the INDEX() on Label, you can see that the INDEX() corresponds with the month number: 

          Next, the formula determines whether the current INDEX() is equal to the Year selected in the parameter. The MIN(YEAR([Order Date])) grabs the year of the order date and checks whether it matches the YoY Parameter. If It does, it "assigns" the INDEX() value to all months for that year, and for months not in the parameter year, no INDEX() value is assigned.

          For example, the YoY parameter is 2015, and the INDEX() of January 2015 is 37, Since the MIN(YEAR([Order Date])) = parameter value (2015), it "assigns" an INDEX of 37 to January 2015. But for a month like December 2014, while the INDEX() is 36, the "assigned" INDEX() is null (since the Order Year does not match the parameter), so a value of FALSE is assigned. So when the Year Over Year field is is added to the filter, it excludes values where the INDEX value is not equal to the "assigned" INDEX().


          Hope this helps.



          • 2. Re: YOY by Index Parameter
            Yingying Zeng

            Putting the Index on the Text really explains everything clearly!!!


            Thanks a lot Walter!!!