9 Replies Latest reply: Dec 18, 2014 3:33 AM by Michiel van de Goor RSS

    Expression considering month and month-1 with bar chart?

      Sup guys.

       

      I'm trying to make a bar chart with a month dimension, but in my expression i have to divide by month-1 to get a percentage.

       

      Dimension: [Mês Lotacao]


      =num(count({$<FlagDemitidos={'S'}>} distinct CHV_CONTRATO)
      /
      count({$<[Mês Lotacao]={'$(=[Mês Lotacao]-1)'},FlagEstagiario={'N'}>} CPF_LOT2),'#.##0,00%')

       

      I've tried a lot of variations, with addmonths and etc, but nothing seems to work.

       

      Since the first row will consider the month on dimension, the second one should be the current Month in the chart-1.

       

      Any ideas? i've only managed to get this thing done with 12 expressions(one per month ;/)