1 Reply Latest reply: Sep 9, 2016 5:46 PM by Sunny Talwar RSS

    Set Analysis Expression Syntax Issue

    Light Section

      I am trying to create a dynamic search string in the set analysis expression using variables, but it doesn't seem to work.

       

      I have 2 variables that store the dynamic selections from year and month field, which are then used in the main expression's set analysis.

       

      Variable Definitions:

      Let vEP_Month = Chr(39) & Concat(Distinct If(GetSelectedCount(Revenue_Month) = 0, MaxMonthTxt, Revenue_Month) , Chr(39) &  ',' & Chr(39))  & Chr(39);

       

      Let vEP_Year = Chr(39) & Concat(Distinct  If(GetSelectedCount(Fiscal_Year) = 0, $(MaxYear), Fiscal_Year), Chr(39) & ',' & Chr(39)) & Chr(39);

       

      Variable Outputs:

      var.png

       

       

      Expression to calculate Revenue

      Sum({<Fiscal_Year = {$(vEP_Year)}, Revenue_Month = {$(vEP_Month)}>} Net_Revenue_YTD)