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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
burgersurfer
Contributor III
Contributor III

Set analysis or another method to get accurate data

Hi

After a lot of help from this forum, I now have a table with few synthetic keys. Through one of the combined keys, I now have a PRODUCTLEDGER table linked to the SALESTRANSACTIONDETAIL table, as shown in this data structure. But this seems to be wrong, because I have gaps in my data, that must be fixed through either a different key, or through set analysis.I am not sure that a ledger table should link to a detail table like this, but this is how I removed the loop.

When selecting an item in QV from my list of products, I correctly get the transactions for that product (this comes from SALESTRANSACTIONDETAIL). But, in that same selection,I only get the stock on-hand for the sizes where I had sales. I want to see all stock on-hand for the item, whether we had sales on it or not. I tried this with inaccurate results:

sum({$<TD_QTY = >} PL_QTYONHAND)

Any help please?

error loading image

Labels (1)
1 Reply
burgersurfer
Contributor III
Contributor III
Author

Anyone?

Maybe the real question in this is what must the data structure look like, for a Sales>Sales Detail + order>OrderDetail + Purchase>Purchase Detail + Product + Ledger + Store set of tables.