Discussion board where members can learn more about Qlik Sense App Development and Usage.
I Have a straight table with 4 columns: Customer. Product, Update date and inventory (Quantity).
Not all the customers are updated daily and not all the products for a customer are updated in each update.
For each combination of customer & product, I need to show the latest update only.
How can this be achieved?
Hi @sogloqlik , here a sample of scripting for doing what you ask.
tell me if it works.
Customer & ' | ' & Product as %_Key,
max([Update date]) as [Max Update date]
group By %_Key;
@sogloqlik try mayils suggestion.
i would actually suggest a variation of @QFabian s suggestion. in the script using max create a flag which indicates the latest records for your combination.
then use that flag in set analysis. this would be most efficient and flexible way. aggr will work but can be a little heavy on processing.
Data: Load Customer & ' | ' & Product as %_Key, Customer, Product, [Update date], inventory From yoursource; left join (Data) Load %_Key, max([Update date]) as [Max Update date] 'Y' as LatestFlag Resident Data group By %_Key;