3 Replies Latest reply: Nov 15, 2017 7:31 AM by Vineeth Pujari RSS

    finding previous quarter from recent

    Pooja Goswami

      I want that whenever we select Quarter Q1 even if the multiple quarters are selected, then it should get replaced by Q4.

      - In order to get Quarter value Q1 I m using if() condition i.e. if(mid(Quarters,2)=1

      - For multiple Quarter Selections I m using CONCAT() function.

      - In order to replace Q1 with Q4 I m using variable Max_Quarter. which makes my expression as

      concat( distinct if(mid(Quarters,2)=1,$(Max_Quarter)),',')


      Current Quarter                Previous Quarter

      Q4                                      Q3

      Q3                                      Q2

      Q2                                      Q1

      Q1                                      Q0

      My Requirement is that this Q0 should be replaced by Q4 of the previous year i.e.

       

      Current Quarter                  Previous Quarter

      Q4                                      Q3

      Q3                                      Q2

      Q2                                      Q1

      Q1                                      Q4

      NOTE: Previous year logic has already been implemented in Max_Quarter variable.

       

      Please suggest changes in already build expression i.e. in

       

      concat( distinct if(mid(Quarters,2)=1,$(Max_Quarter)),',')