Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

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
robert_mika
MVP
MVP

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

Aggr() function

View solution in original post

3 Replies
paulyeo11
Master
Master
Author

my QVF

robert_mika
MVP
MVP

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

Aggr() function

paulyeo11
Master
Master
Author

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

))