Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
greend21
Contributor II

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
MVP
MVP

Re: Create and Add Field to Table

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

     .....

4 Replies
MVP
MVP

Re: Create and Add Field to Table

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

thanks

greend21
Contributor II

Re: Create and Add Field to Table

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.

MVP
MVP

Re: Create and Add Field to Table

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

     .....

atkinsow
Valued Contributor II

Re: Create and Add Field to Table

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;