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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggregate ceiled rows

I have a table with the following dimensions:

* Article

* Receipt date

* # pcs

* # pcs per pallet

And the following calculated expression

* (ceil(sum(# pcs/ # pcs per pallet) to calculate the rounded # pallets to be received.

This works fine, but in another table I want to calculate the same, but summed per date:

Dimension:

* Receipt date

And the same following calculated expression, but then aggregated as in the first table. Otherwise the total # pallets is calculated over the (total #pcs/total #pcs per pallet) - here you will get a lower number of pallets.

How can I use the agg and the ceil?

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You need to put the ceil inside the sum:

sum(ceil(pcs/[pcs per pallet]))


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Not applicable
Author

See example

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You need to put the ceil inside the sum:

sum(ceil(pcs/[pcs per pallet]))


talk is cheap, supply exceeds demand