Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm a beginner in QlikSense and still learning concepts around scripting.
I have a table like the one below,
| Attribute Type | Attribute |
| Type | Ad |
| Type | Program |
| Channel | SMS |
| Channel | |
| Status | Sent |
| Status | Pending |
Now I want to create filters from the above table like,
| Channel |
| SMS |
| Status |
| Sent |
| Pending |
Please suggest a way to do this.
Thanks,
as below
temp:
load * inline [
Attribute Type,Attribute
Type,Ad
Type,Program
Channel,SMS
Channel,EMAIL
Status,Sent
Status,Pending
];
for each attr in FieldValueList('Attribute Type')
$(attr):
Load Attribute as [$(attr)]
Resident temp
Where [Attribute Type]='$(attr)';
next
drop table temp;
exit Script;
as below
temp:
load * inline [
Attribute Type,Attribute
Type,Ad
Type,Program
Channel,SMS
Channel,EMAIL
Status,Sent
Status,Pending
];
for each attr in FieldValueList('Attribute Type')
$(attr):
Load Attribute as [$(attr)]
Resident temp
Where [Attribute Type]='$(attr)';
next
drop table temp;
exit Script;
Thanks @vinieme12 , Your solution worked!