Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

ashish_2511
Not applicable

Add new values to an existing field

Dear Community -

I have a field called ASG which has Values - (CR, CAG, LC, ME).

I want to add one more Value to it in the script Called 'THT' which will mean all those activities where AST = 'HT'.

So finally I'll have 5 Values in it.

The purpose is to show - Count (activity IDs) by ASGs in  straight table

Here's My Data sample -

   

Activity IDASGAST
1CRHT
2CAGCA
3LCHT
4MEHT
5CAGCA
6CAGCA
7MEHT
8CRHT
9LCHT
10CAGCA

 

And this is how I want to create my Straight table -

   

ASGCount
CAG4
CR2
LC2
ME2
THT6

Can anybody help me here?

Thanks in advance!

Tags (1)
4 Replies
stalwar1
Not applicable

Re: Add new values to an existing field

Check attached

Capture.PNG

MarcoWedel
Not applicable

Re: Add new values to an existing field

Hi,

one solution could be:

QlikCommunity_Thread_304761_Pic1.JPG

table1:

LOAD [Activity ID],

    ASG,

    AST

FROM [https://community.qlik.com/thread/304761] (html, codepage is 1252, embedded labels, table is @1);

LOAD [Activity ID],

    'THT' as ASG,

    AST

Resident table1

Where AST='HT';

hope this helps

regards

Marco

Arjunarao
Not applicable

Re: Add new values to an existing field

Hi,

Check my solution.

Capture.PNG

1.PNG

shiveshsingh
Not applicable

Re: Add new values to an existing field

Try this

T:LOAD * INLINE [

  

    Activity ID, ASG, AST

    1, CR, HT

    2, CAG, CA

    3, LC, HT

    4, ME, HT

    5, CAG, CA

    6, CAG, CA

    7, ME, HT

    8, CR, HT

    9, LC, HT

    10, CAG, CA

];

Join

F:

load  [Activity ID], 'THT' as ASG

Resident T

where AST = 'HT';

This would give you Nulls for AST corresponding to ASG = 'THT'