Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jamesehunt
Contributor III
Contributor III

Round / Ceil & sumifs

Hello,

i am looking for a function for the following example:

How can I round / ceil the amount of pallets summed up on the "Ref Number"?

 

Ref NumberDelivery TypCountry from# of Pallets
14700781NormalUK0,2
14700781NormalUK0,2
14700785NormalUK0,9
14700785NormalUK0,1
14700785NormalUK1,02
14700797NormalUK0,01
14700798NormalUK0,1
14700798NormalUK1,02
14700798NormalUK0,5
14700801NormalUK0,45

Expected Result:

14700781: 1 Pallet

14700785: 3 Pallets

14700797: 1 Pallet

14700798: 2 Pallet

14700801: 1 Pallet

Thank you very much for help

4 Replies
swuehl
MVP
MVP

Maybe

=Ceil(Sum([# of Pallets]))

as expression in a table chart with dimension [Ref Number]

edit:

Or in the script:

LOAD  [Ref Number],

               Ceil(Sum([# of Pallets])) as [Ceiled # Pallets]

RESIDENT YourTable

GROUP BY [Ref Number];

Anil_Babu_Samineni

Try Ceil() / Floor(). I believe you may need this? =Ceil(Sum([# of Pallets]))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
jamesehunt
Contributor III
Contributor III
Author

This function doesn't give me the answer expected.

I would like to see on Country level how many pallets were send out.  The expected Result is 83.194.

The function would need to sum mixed pallets on "Ref Document" level excluding the Provider Type "Parcel".

The summed up mixed pallets would need to be round up to the next integer.

I need to see on country level how many pllets have been send out.

Much obliged for your help 

swuehl
MVP
MVP

Guess your data model is different from what you described in your original post.

For example, what about the 'Ref document' level? is that a hierarchy where 'Ref number' is part of?

Also, 'Provider Type' was not part of the table you described.

If you want any help in an efficient way, please describe your model in all necessary detail, together with the context you want to use the expression and some sample data records and expected result.

If possible, post a small sample application, please.