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

Create 1 new field from 4 existing / merge?

Hi

I have two tables, EducationNR and EducationText. I want to sort the numbers and create a new text-table. Like this. 546,547,556 and 557 should be linked to a new textfield named University Education.  100,102 and 106 should be named as Lower Education and so on...

So when I click on Universty Education the posts correspondening to 546,547,556 and 557 should be shown.

I guess I do this in the script but how?

Attached my file

1 Solution

Accepted Solutions
swuehl
MVP
MVP

This sounds like a classical classification, right?

If the classification is static (not depending on selections), you want to do this in the script.

You can either do this using conditionals (maybe using some match() functions, too):

LOAD

EducationNr,

if( EducationNr >= 100 and EducationNR <=106, 'University',

if( EducationNr >=546 and EducationNr <= 557, 'Lower Education')) as EduClass,

...

FROM ...;

or e.g. using a mapping table, which is described here:

http://community.qlik.com/message/47282#47282

View solution in original post

4 Replies
swuehl
MVP
MVP

This sounds like a classical classification, right?

If the classification is static (not depending on selections), you want to do this in the script.

You can either do this using conditionals (maybe using some match() functions, too):

LOAD

EducationNr,

if( EducationNr >= 100 and EducationNR <=106, 'University',

if( EducationNr >=546 and EducationNr <= 557, 'Lower Education')) as EduClass,

...

FROM ...;

or e.g. using a mapping table, which is described here:

http://community.qlik.com/message/47282#47282

Not applicable
Author

Hmz swuehl was quicker than me, but I had a QVW already, so I'll just post it.

See the example attached 🙂

Here I have an if-construction and a match() construction

Not applicable
Author

Thanks both of you! A second thought. How can I (from the orginal fields) show only the highest number per ID in a straight table? = only show 546 if the person also have a 100.

Not applicable
Author

Have a chart (straight table) with ID as dimension and as expression max(EduNr) I guess.