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: 
marteeke
Contributor II
Contributor II

Get price from second table where date is equel or less than date in first table.

Hi everyone!

I've got a table with stock-mutations/sales and a table with historic price mutations.
I'm trying to get the right price to go with the mutations/sales.

Feels like i'm close with  '=Max(If(date([InkoopPrijsHistorie.Datum]) <= date([Vrd.Datum]), Prijs))', but this doens't work when the last price isn't the highest..

Any ideas?

Thanks!

Labels (1)
2 Replies
chrismarlow
Specialist II
Specialist II

Hi,

As a work around If you have disconnected data tables you can possibly use FirstSortedValue similar to below ... I would generally suggest that you should be doing something in script to associate the data properly though.

20220419_1.png

Cheers,

Chris.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I usually find it easiest to generate a price for each date. For example see

Qlikview Cookbook: Expand A Pricing Date Table https://qlikviewcookbook.com/recipes/download-info/expand-a-pricing-date-table/

-Rob