Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
greend21
Creator III
Creator III

Create and Add Field to Table

Hi,

If I have a bunch of phone data such as # of calls, talk time, split #, etc is it possible to load this data and then add another field where Split 1 = Group A and Split 2 = Group B for filtering purposes? Or would I have to go back to my data and add Group 1 next to all Split 1 fields?

I wasn't sure if I would need to make that a small inline table and then join the two.

Thanks,

Dan

1 Solution

Accepted Solutions
maxgro
MVP
MVP

add the field when you load the data, something like

load

     Split,

     User,

     [# of Calls],

     pick(match(Split, 1, 2), 'A', 'B') as Group

from

     .....

View solution in original post

4 Replies
maxgro
MVP
MVP

could you add a small example, some rows with the result you want?

thanks

greend21
Creator III
Creator III
Author

Current data would look like:

Split    User    # of Calls

1            1           4

1            2           5

2            3           4

1            4           7

2            5           3                  

The real data is hundreds of lines so I was wondering if there was a way within the script to make split 1 part of group A and split 2 part of group B like this:

Group    Split    User    # of Calls

A              1            1           4

A              1            2           5

B              2            3           4

A              1            4           7

B              2            5           3  

I could then display the Group in the data rather than Split as this would be more user friendly.

maxgro
MVP
MVP

add the field when you load the data, something like

load

     Split,

     User,

     [# of Calls],

     pick(match(Split, 1, 2), 'A', 'B') as Group

from

     .....

Anonymous
Not applicable

You could no a join or apply map to a list of unique groups and splits.  Something like:

Data:

Load

Split,

User,

[# of Calls]

From

YourDataFile;

inner join(Data)

Load

GroupName,

Split

From

YourGroupFile;