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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Joining Two Distincts

Hello:

I have an expression that is trying to count the number of items where the onhand amount is less than the job lot. Think of job lot as the number of items needed to complete a task. For instance, to build a table you would need 4 legs, so your job lot for the table leg item would be 4. Additionally, each item may have multiple job lots because of different placements throughout the store; however, each item has only 1 on hand amount per day per store.

Here is where I'm at so far:

Count

({$<POSDate={">$(=Date($(vMaxPOS)-($(vNumOfDays)-1)))<=$(=Date($(vMaxPOS)))"}>}DISTINCT If(OnHand < job_lot,ItemNum))

{$<POSDate={">$(=Date($(vMaxPOS)-($(vNumOfDays)-1)))<=$(=Date($(vMaxPOS)))"}>} Limits the number of days this expression looks at. vNumOfDays is set through an input box. vMaxPOS is simply the max pos date available.

So far this expression works fine for its intended purpose; however I need one more addition to it--each count needs to also check for a distinct sku (stock keeping unit) number. My question is how do I add another distinct to this expression? Or perhaps is there a better way to look at it all together?

0 Replies