3 Replies Latest reply: Mar 6, 2012 12:10 AM by jagan mohan rao appala RSS

    Set analysis and if condition

      Hi,

       

      I'm working on a pivot table that requires the user to select a single month first and then will display amounts in different categories for this month. So far this works.

       

      Now I'm trying to display the development in a category in a mini chart within the table, with the month (MonthID) as dimension.

       

      Using set analysis I can "break out" of the month selection the user made successfully, ie

      sum({<MonthID=>}Amount)

      This works fine too.

       

      Now what I'm trying to accomplish is that this mini chart is only displayed when the amount *for the month the user has selected*  is negative.

      So the mini chart should display the amount development over time, including potentially positive amounts in months different to the one that the user has selected (but only if the amount in the month the user has selected is negative).

       

      I tried this, but this leads to nothing, it seems the whole set analysis is not working using this formula because this will only show data for the month the user has selected

      =if(sum(Amount)<0,sum({<MonthID=>}Amount))

       

      Why is this happening and what can I do about it?

       

      Thanks a lot for any help about this!