3 Replies Latest reply: Apr 13, 2016 3:44 AM by Yeo Poh sai

# why add sum(aggr into expression it return null value ?

Hi All

I have below expression work fine :-

Sum({<year = {\$(=Max(year) - 1)} , month = {"<=\$(=Max({<year={\$(=Max(year) - 1)}, sales = {'*'}>} month))"}, rEVENUE={"rEVENUE"} >} Amount*1)/Rate/1000

I try to add sum(aggr into above expression :-

sum(aggr(

Sum({<year = {\$(=Max(year) - 1)} , month = {"<=\$(=Max({<year={\$(=Max(year) - 1)}, sales = {'*'}>} month))"}, rEVENUE={"rEVENUE"} >} Amount*1)/Rate/1000

))

it display null value.

Paul

my QVF

• ###### Re: why add sum(aggr into expression it return null value ?

You have to specify dimesion for the aggr() function.

Aggr() function

• ###### Re: why add sum(aggr into expression it return null value ?

Hi Robert

Thank you very much , it work now :-

sum(aggr(

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

))