Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 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 |
And this is how I want to create my Straight table -
ASG | Count |
CAG | 4 |
CR | 2 |
LC | 2 |
ME | 2 |
THT | 6 |
Can anybody help me here?
Thanks in advance!
Check attached
Hi,
one solution could be:
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
Hi,
Check my solution.
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'