3 Replies Latest reply: Jun 18, 2016 2:34 AM by Yeo Poh sai

# Why Expression after i add Aggr function , it return wrong value ?

Hi All I have below expression , return correct values :- '= money( SUM({}Amount*-1)/1000/\$(Columndim89) , \$(vMoneyFormatK)) Due to it does not display Total Sum , So I have modify the above expression with Aggr , but it return wrong value , May I know how to make it return correct value ? = money( Sum(Aggr(SUM({}Amount*1)/\$(Columndim89)/1000, SOURCE)) , \$(vMoneyFormatK)) Paul

• ###### Re: Why Expression after i add Aggr function , it return wrong value ?

Hi All

I have below expression , return  correct value  :-

money(

SUM({<year = {"\$(=Max(year)-1)"},month={"<\$(=Max({<sales = {'*'}, year = {\$(=Max(year))}>}month))"},eXP={eXP}>}Amount*-1)/1000/\$(Columndim89)

, \$(vMoneyFormatK))

Due to it does not display Total Sum , So I have modify the above expression with Aggr , but it return wrong value , May I know how to make it return correct value ? .

=

money(

Sum(Aggr(SUM({<year = {"\$(=Max(year)-1)"},month={"<=\$(=Max({<sales = {'*'}, year = {\$(=Max(year))}>}month))"},eXP={eXP}>}Amount*1)/\$(Columndim89)/1000, SOURCE))

, \$(vMoneyFormatK))

Paul