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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Article Price valid from

Hello community,
I'm currently struggling with the following requirement:

I have a table orders wit orderid date  articleid
The table article is also linked via articleid to articlevalidprice table
This table looks like:

articleid, validfrom, price
1             27.01.2012    10
1             30.01.2012     11
I need to find out the correct price eg. for a order on 14.02.2012 (-> 11)
How can i impement this?
max
(if(order.date>= articlevalidprice.validfrom,articlevalidprice.validfrom))
this delivers the correct date. I also had a look at this formula
Sum({<articlevalidprice.validfrom ={"$(=max(if(order.date >= articlevalidprice.validfrom ,articlevalidprice.validfrom )))"}>articlevalidprice.price)
but this delievers always the max value per article.

Chart should look like article id, date, price
Thanks in advance for your help.
Kind regards
Aloah
Labels (1)
1 Reply
swuehl
Champion III
Champion III

There are some possible solutions to this, e.g. creating a continuous date range and filling up the price values or using INTERVALMATCH load prefix.

Just having a quick search, I found this discussion which will link a sample of the QV cookbook, always a good start:

http://community.qlik.com/message/73877

Hope this helps,

Stefan