Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Trying to concatenate two data sets

Hi all,

I have an issue with two tables of data which contain field values for a list of items (services in this case).

The first table contains the current live values of each field, while the second table contains the historical values prior to each update.

My goal is to use the data from both tables so I can identify when changes were made and the corresponding value changes.

Below are examples of how the tables appear currently:

Live Data

Service_IDService_Version_IDService_ColourDate
461987109082Blue07-Aug-2015
723145607288Yellow03-Aug-2015
998422723811Green04-Aug-2015

Historical Data

Service_IDService_VersionHist_IDService_HistColourHistDate
461987107334Red25-Jun-2015
461987105969White14-May-2015
723145605844Blue17-Jul-2015
723145605118Yellow09-Jul-2015
998422711865White04-Mar-2015
998422709453Blue23-Feb-2015

What I am trying to get is a view where I can map the historical fields with the corresponding live fields (Version_ID, Service_Colour, Date).

My goal is to then be able to use a global calendar to filter for colour changes over periods of time. I.e. Identify the previous Service_Colour for each Service_ID and the date on which it was implemented.

I had tried to do this is a different way using mapping but did not get the required output.

Does anyone have an idea on the most effective way to do this?

Thanks very much.

13 Replies
Anonymous
Not applicable
Author

Thanks both.

This worked nicely to add the history data as new rows in the master table.

I encounter an issue with one of my datasets however, where the Live Data table has some additional fields which are are not in the Historical Data table.

As a result they return null values for the historical entries, whereas I would like them to return the same value that is in the live table. These are fixed values which do not get updated, so showing the live vlaue would be all I need.

Is mapping the best solution to resolve this, before concatenation?

maxgro
MVP
MVP

It's a solution.

Another could be to add a table with these fixed values fields and link this new table with the fact table by Service_ID (or some other fields).

We (community) have a partial view of your model , requirements, etc, ...... We can try to give different solutions, it's hard to say which is the best.

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

I suggest you post sample data

Anonymous
Not applicable
Author

Hi Gabriel,

Attached is a basic version with mapping used to add any extra fields.

This is ok in the instance where I only map a couple of fields, but I'm aware the way it's done may not be the most efficient of mapping multiple fields.

Thanks for all your help. This has pretty much resolved the problem.