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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Concatenate file with partial keys

Hi,probably an i have easy problem but no solution.

I have to concatenate 2 table with different keys.

The first table rapresent the orders the second one the cost of shipping.

The Order table has the format date yyyymmdd, the second one has the same format date but rapresent the start date with cost.

Example

A) TABLE ORDER

Date, Order, Article, qty, price

20091103,Ord12345,Art.2,3,12

2009101,Ord1012345,Art.3,7,11

B) TABLE COST

20081203,22

20090712,33

This means that the cost 22 is valid from 03.12.2008 until 11072009

The cost 33 is valid from 12.07.2009 until now

Someone has a solution

Many Thanks in advance

Claudio

5 Replies
Not applicable
Author

I think u can just relate the information in an expression formula inside your graph/table output with an "if" or using "Set Analysis" (from to)

Sergio



Not applicable
Author

If you add the EndDate in table Cost, you can use WHILE and IterNo to do something like this:

LEFT JOIN (Order)

LOAD StartDate + IterNo() - 1 AS Date

, Cost AS ShippingCost

RESIDENT Cost

WHILE StartDate + IterNo() - 1 <= EndDate;

I uploaded an example here [View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Components.UserFiles/00.00.01.15.11.Posted/ValidityDate.qvw]

dd. //

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Take a look at "IntervalMatch" in the Ref Guide.

-Rob

Not applicable
Author

Many thanks

Claudio

Not applicable
Author

Many thank to all of you Claudio