1 Reply Latest reply on Apr 6, 2016 2:56 PM by diego.medrano

    Shifting Graph From 2016 Week 00 to 2015 Week 53

    Shivang Desai

      Hi All,

       

      I am trying to shift graph from one week to another. Have done it for previous years, but not able to do for Week 00 2016.

       

      Example:

       

      Screenshot sh.png

       

      So here I am trying to shift Week 00 2015/16 (purple line) value to Week 52 2014/15 (blue line) value.

       

      My current logic lets me shift graph but not able to achieve this. Could anyone help me with this please?

       

      Current implementation:

       

      IF [Date_Financial Year] = "2014/15"
      THEN  "Week " + RIGHT("00" + str(int(RIGHT([Date_Financial Week],2)) - 1),2)

       

      ELSEIF [Date_Financial Year] = "2015/16"
      THEN  "Week " + RIGHT("00" + str(int(RIGHT([Date_Financial Week],2)) - 1),2) 

       

      ELSE ([Date_Financial Week])
      END

       

       

      Terms used:

       

      [Date Financial Week] = Current week i.e Starting from 14/03

      [Date Financial Year] =  Current Year i.e  2016/17

       

       

      I thought of adding the below (bold) to the implementation but din't work.

       

      IF [Date_Financial Year] = "2014/15"
      THEN  "Week " + RIGHT("00" + str(int(RIGHT([Date_Financial Week],2)) - 1),2)

      ELSEIF [Date_Financial Year] = "2015/16"
      THEN "Week " + RIGHT("00" + str(int(RIGHT([Date_Financial Week],2)) - 1),2) 

      ELSEIF [Date_Financial Year] = "2015/16" and "Week " + RIGHT("00" + str(int(RIGHT([Date_Financial Week],2)) - 1),2) = "Week 00"
      THEN "Week " + str(int(RIGHT([Date_Financial Week],2)) + 53) 

      ELSE ([Date_Financial Week])
      END

       

       

       

       

      Regards