7 Replies Latest reply: Oct 31, 2017 11:46 AM by Massimo Grossi RSS

    Help with Case or if statement

    Vinay kumar Bangari

      I am getting control statement error. If this can be written in if statement or case anything should be fine. if possible can anyone send in qvw file.

      @

      Script :

       

      let vDEPT_EXCLUSIONS='CAPITAL_PROJECTS';  // if this variable is equal to CAPITAL_PROJECTS then it will have project id filters in the script or else no Project ID filter will be there 

       

       

      let vProjectID=4;

       

      let vDEPT_EXCLUSIONS=CAPITAL_PROJECTS;

       

       

       

      Switch $(vDEPT_EXCLUSIONS)

      Case 'CAPITAL_PROJECTS'

       

      [Dimensions Self Service]:

      LOAD * INLINE [

              _Dimension, _DimensionID  

              Account, 1

              Account Name, 2

              Account Node3, 3 

              Account Node4, 4

              Account Node5, 5   ]

      ;

       

      Default

      Dimensions Self Service]:

      LOAD * INLINE [

              _Dimension, _DimensionID  

              Account, 1

              Account Name, 2

                ]

      ;

       

      End Switch

       

       

       

       

       

      EXIT SCRIPT;