3 Replies Latest reply: Sep 30, 2015 4:37 AM by Roberto Capancioni RSS

    expression with parameters in a pivot

      In a pivot table I've a dimension field (YEAR_MONTH) and a measure given by an expression with a parameter (MyDim ($1)), I'd like to Pass as parameter a numeric value (MONTH_ID) related to the dimension field, I tought this cold be a solution

       

      $(vMyDim( $(=aggr(only(YEAR_MONTH_ID),YEAR_MONTH))))

       

      but it doesn't work (only works when a single value is selce in YEAR_MONTH)

       

      At The moment I've found a terrible  workaround :

       

      if(aggr(only(YEAR_MONTH_ID),YEAR_MONTH)=1,$(vMyDim(1)), if(aggr(only(YEAR_MONTH_ID),YEAR_MONTH)=2,$(vMyDim(2)),0))

       

      Have you any suggestions?