2 Replies Latest reply: Jul 17, 2014 3:27 AM by jagan mohan rao appala RSS

    Set modifiers in to a variable

    Harshana Etampawala

      Hi

       

      I am Creating a Dashboard for Profit & Loss. I have used the following code to access Period to date figure depend on the user selection.

      It is working perfectly.

       

      if (ValueList('Direct Income','Direct Expense','Gross Profit','Other Expense','Profit Before Other Income','Other Income','Net Profit')='Direct Income',

         sum({$<PeriodID={"<=$(=Max(PeriodID)-12)"},[Financial Year]={$(=Max([Financial Year])-101)},Period=,[Account Type]={'D'}>}$(eAccountBalance)),

       

      I have tried to set up a variable for the PeriodID and Financial Year(User Selection) and cried to used it in the main expression as below but the variable vSetPTD initialization is giving me an error.

       

      vSetPTD


      PeriodID={"<=$(=Max(PeriodID)-12)"},[Financial Year]={$(=Max([Financial Year])-101)},Period=

       

      **Main Expression

       

      sum({$<$(vSetPTD),[Account Type]={'D'}>}$(eAccountBalance)),

       

      Is their a way to overcome this issue.

       

      Thank you.

       

      Harsh