4 Replies Latest reply: Aug 5, 2017 7:35 AM by Sasidhar Parupudi RSS

    how to write aggr expression

    naveen kumar

      Hello All,

                    A weird thing is happening to me i don't know whether it is my expression fault or my data modeling




      i am trying to display total spend by grouping plant name and material name ,what i mean is ,

      the 3rd and 4 th row, same material ,same plant but different suppliers so i need to group both and total spend will be same which is working perfect

      the 1st row has only one supplier so total spend should be 80.27 but i am getting nil  as total spend which is wrong


      Dimensions: 1)calculated dimension===>if(wildmatch(New_Column1,'Non-Zpart'),New_Column)  Label  as Material

                            2)Plant Name

                            3)Plant Code


                             5)Supplier ID


      Measure :1) Sum({<SCOPE={'Yes'},MATL_TYPE={'HALB','ROH'},[FISCAL YEAR]={$(=max([FISCAL YEAR])-1)}>}Volume)

                       2)Sum({<SCOPE={'Yes'},MATL_TYPE={'HALB','ROH'},[FISCAL YEAR]={$(=max([FISCAL YEAR])-1)}>}SPEND)


                      4)aggr(nodistinct Sum({<SCOPE={'Yes'},MATL_TYPE={'HALB','ROH'},[FISCAL YEAR]={$(=max([FISCAL YEAR])-1)}>}SPEND),New_Column,[PLANT NAME] )



      all the expression are working accept this 4 expression which is working partially ,what could be the reason any suggestion plz