5 Replies Latest reply: Jul 31, 2012 2:02 AM by Sunil Chauhan RSS

    Urgent help needed with set analysis in expression

      I have 2 reports: One by Month Year as dimension and other using set analysis to show the latest monthyear data.


      1. pivot report by month-year as dimension:


      where one of my expression is max(aggr(sum({< PositionType={Resource} > } EN_TOTAL_MW_DA_15min), Year, Month, Day, HE)) and gives the right result which for Mar 2012 should be 3587.



      2. Using set analysis to show the latest monthyear data(assuming Mar for now):  doing the set analysis and using the expression as below, do not get the same results and need help with the below expression to give the same result as above.


      num(max(aggr(sum({ < Year={$(=Year(Date(max(MakeDate(Year, Month, Day)), 'YYYY')))}, Month={$(=Month(Date(max(MakeDate(Year, Month, Day)), 'MMM')))}, PositionType={Resource} > }EN_TOTAL_MW_DA_15min), Year, Month, Day, HE)), '#,##0')


      Am I doing anything wrong as for some reason the aggr dosn't work and do not even get any results.


      Attached please find the screen shot, the numbers in red needs to match with that as green.


      Any help with this would be greatly appreciated.