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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
simonegabrielli
Contributor III
Contributor III

Create a filtered new column in script

Hi there,

I am struggling with a problem but i believe it has a simple solution.

I have two table: [Year Code] (that contains the Year ID: Act_2018, Act_2019, etc....) and [Year Description] (that contains the informations about the years: 'Actual 2018', 'Actual 2019', etc....). I'm trying to create a new table, called [Year], which consists only of some fields present in the previous tables, that is 'Actual 2018' and 'Actual 2019'.

my actual script is:

Scenario:

LOAD
"Year Code",
"Year Description"
FROM [lib://.................);

 

thanks for the help.

Labels (3)
1 Solution

Accepted Solutions
tm_burgers
Creator III
Creator III

Try:

 

[Year]:

noConcatenate LOAD

   [Year Code],

   [Year Description]

Resident  TableYear

group by [Year Code];

 

 

Or are your two tables not associated?

In that case, you need to create a KeyMatch field between them,

 

like :

 

right([Year Code],4) as YearKeyField

&

right([Year Description],4) as YearKeyField

 

 

then join the tables together like:

 

[Year]:

noConcatenate LOAD

   YearKeyField,

   [Year Code]

Resident  TableYearCodes

group by [YearKeyField];

 

left join (Year)

LOAD

    YearKeyField,

   [Year Description]

Resident  TableYearDescriptions

group by [YearKeyField];

 

 

 

View solution in original post

1 Reply
tm_burgers
Creator III
Creator III

Try:

 

[Year]:

noConcatenate LOAD

   [Year Code],

   [Year Description]

Resident  TableYear

group by [Year Code];

 

 

Or are your two tables not associated?

In that case, you need to create a KeyMatch field between them,

 

like :

 

right([Year Code],4) as YearKeyField

&

right([Year Description],4) as YearKeyField

 

 

then join the tables together like:

 

[Year]:

noConcatenate LOAD

   YearKeyField,

   [Year Code]

Resident  TableYearCodes

group by [YearKeyField];

 

left join (Year)

LOAD

    YearKeyField,

   [Year Description]

Resident  TableYearDescriptions

group by [YearKeyField];