# Qlik Sense App Development

Valued Contributor II

## 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

1 Solution

Accepted Solutions
MVP

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

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

Aggr() function

3 Replies
Valued Contributor II

my QVF

MVP

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

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

Aggr() function

Valued Contributor II

## 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

))