8 Replies Latest reply: Nov 21, 2012 12:03 PM by kt_sesor RSS

    Pick Match statement as a chart expression not working



      I've used a pick(match) statement as i wanted to avoid nested ifs, however following previous posts I cant seem to get mine to work.

      vSalesExpressions- is set by an input box to one of the strings defined, I have put this expression as an expression in a line graph.


      pick(Match($(vSalesExpressions),'Avg Sales','Median
      Sales','Avg Winning Products','Avg Loosing Products','Top 10 Sales','Bottom 10 Sales'),



      Avg({1<profitindicator = {1} >}ProfitPc),

      Avg({1<profitindicator = {0} >}ProfitPc),

      Avg({1<SalesPerson = {"=Rank(aggr(avg(ProfitPc),
      SalesPerson)) <= 10"

      Avg({1<SalesId = {"=Rank(aggr(-avg(ProfitPc),SalesId))<=10  "}>} ProfitPc)