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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Write an aggr expression

Hi guys!

I divided the weight in classes of 2 like this:

=Class(emptyings_adjusted_weight),2)


Actually I need the sum of the weight, how do I write that?

I tried:

=Class(aggr(sum(emptyings_adjusted_weight)),2)


Anyone else better ideas?


Kind regards,

Katleen

1 Solution

Accepted Solutions
DavidFoster1
Specialist
Specialist

The aggr statement needs at least one dimension as the second parameter to provide the 'group by' context for the sum.

So it should be something like:

=Class(aggr(sum(emptyings_adjusted_weight),[Widget]),2)

View solution in original post

3 Replies
DavidFoster1
Specialist
Specialist

The aggr statement needs at least one dimension as the second parameter to provide the 'group by' context for the sum.

So it should be something like:

=Class(aggr(sum(emptyings_adjusted_weight),[Widget]),2)

rubenmarin1

Not sure about what you are searching but aggr needs the fields.

Aren't you searching something like =Class(sum(emptyings_adjusted_weight),2) ?


Regards

Anonymous
Not applicable
Author

Can you provide a sample data in excel  and output expected?