3 Replies Latest reply: Jul 5, 2016 8:40 AM by Sunny Talwar RSS

    how to display last three yr

    naveen kumar

      Hello All,

      On a text box i wrote a  action,,which should fire when ever i click on text box, and it should select max last three  year from YEAR field...

      In Textbox---->action---->select in field------>Field:YEAR

      search in String:

      ='>='& max((YEAR)-2)&'<='&MAX(YEAR)

       

       

      which was working great when it was like this

      year(DATE_OF_REVIEW) as YEAR

      i apply this  transformation on YEAR field

       

      'FY'& Date(AddYears(yearstart (DATE_OF_REVIEW, 1, 4),-1),'YY')  &'-'& Date(yearstart (DATE_OF_REVIEW, 1, 4),'YY') as YEAR

       

      so how can i make it work again

       

       

       

       

       

          SuppilerScore:

      LOAD

      CLIENT,

           //LIFNR,

           VENDOR_NAME,

           ROLE,

           DATE_OF_REVIEW,

         

           QM_SCORE,

           //QM_MAX,

           CS_SCORE,

          // CS_MAX,

           GENERAL_SCORE,

           //GENERAL_MAX,

           PROC_SCORE,

          // PROC_MAX,

           MANU_SCORE,

          // MANU_MAX,

           round(TOTAL_SCORE) as TOTAL_SCORE ,

          

           //MAX_SCORE

            //'Q'&Ceil(MONTH(DATE_OF_REVIEW)/3) AS QUATERS,

         // year(DATE_OF_REVIEW) as YEAR

              pick(match(month(DATE_OF_REVIEW),'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'),

      'Q4','Q4','Q4','Q1','Q1','Q1','Q2','Q2','Q2','Q3','Q3','Q3') as QUATERS,

      'FY'& Date(AddYears(yearstart (DATE_OF_REVIEW, 1, 4),-1),'YY')  &'-'& Date(yearstart (DATE_OF_REVIEW, 1, 4),'YY') as YEAR

      // Year(yearstart (DATE_OF_REVIEW, 1, 4)) as YEAR

      FROM

      [..\QVDS\SuppilerScore.qvd]

      (qvd);

       

       

      CrossTable(QUALITY,SCORE,8)

      LOAD

      CLIENT,

      VENDOR_NAME as name1,

           ROLE,

           DATE_OF_REVIEW,

           TOTAL_SCORE,

           QUATERS,

           YEAR,

          YEAR&QUATERS AS YEARQUATER ,

            QM_SCORE AS [Quality Management],

             CS_SCORE as [Customer Service],

           GENERAL_SCORE as General,

          PROC_SCORE as Procurement ,

         MANU_SCORE as Manufacture 

        Resident SuppilerScore;

          DROP Table SuppilerScore;

       

      thanks

      naveen