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

Complicated situation for Lookup function

I have a table with item numbers, descriptions, and a attribute called Cartons to Pallet.  This attribute tells me how many cartons of a particular item number will fit on one pallet.  If an order has less than this number of cartons, then it is a "picked" item, meaning it had to be removed from a full pallet in order to fulfill the order.

When identifying a picked item in an order I am using the Lookup function to set a flag for that item.  As of this moment, it is only checking to see if the number of cartons is less than the cartons to pallet attribute:

If(UNITS < Lookup('CartonsToPallet','ItemNumber',ITEMNUM,'ItemDescriptions'),1,0) AS PickFlag

I would also like to check if the number of cartons is greater than Cartons To Pallet but also divisible by a whole number.  For example, if Cartons To Pallet is 56, and the number of cartons on the order is equal to 56 * 2, or 56 * 3, or any other whole number then this would indicate that whole pallets of this item were loaded and the cartons did not need to be picked. 

10 Replies
mikegrattan
Creator III
Creator III
Author

Works perfectly.  Thanks!