Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ashish_2511
Creator
Creator

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!

4 Replies
sunny_talwar

Check attached

Capture.PNG

MarcoWedel

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

qlikviewwizard
Master II
Master II

Hi,

Check my solution.

Capture.PNG

1.PNG

shiveshsingh
Master
Master

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'