Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
sily_salmon
Contributor
Contributor

Create a filter with values only related to another field

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 EMAIL
Status Sent
Status Pending


Now I want to create filters from the above table like,

Channel
SMS
EMAIL

 

Status
Sent
Pending

Please suggest a way to do this.

Thanks,

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

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;
Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

2 Replies
vinieme12
Champion III
Champion III

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;
Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
sily_salmon
Contributor
Contributor
Author

Thanks @vinieme12 , Your solution worked!