Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
abdullah_unal
Contributor
Contributor

Creating a filter that filters a row multiple times

Hi, I have some campaign names such as A, B, C, A&B, and A&C.  A&B and A&C mean that that row assigned to 2 campaigns. I want to create a filter that shows only A, B and C campaigns. For example, when B is selected then B and A&B campaigns must be filtered, when A is selected then A, A&B, and A&C campaigns must be filtered. Is there any way to create a filter like this?

1 Solution

Accepted Solutions
dplr-rn
Partner - Master III
Partner - Master III

You will need to create a table which maps the combinations with values

Campaign Name    Campaigns

A                                   A

A                                   A&B

A                                   A&C

Doing it programmatically should be possible with nested for loops

View solution in original post

5 Replies
dplr-rn
Partner - Master III
Partner - Master III

You will need to create a table which maps the combinations with values

Campaign Name    Campaigns

A                                   A

A                                   A&B

A                                   A&C

Doing it programmatically should be possible with nested for loops

jheasley
Luminary Alumni
Luminary Alumni

You could create a small additional table using SubField().  If the Delimiter is always '&', then it should be SubField(Campaigns,'&').   This SHOULD give you all possible campaigns as independent values if you load it separately. something like

Load

     RecordID,

     SubField(Campaigns,'&') as Campaign

Resident ORIGINALTABLE;

abdullah_unal
Contributor
Contributor
Author

Thanks for your reply, It has worked.

abdullah_unal
Contributor
Contributor
Author

Thanks for your reply Joe, but we need to map original campaigns with new columns that we create in a new table.

jheasley
Luminary Alumni
Luminary Alumni

understood.  i like dilipranjith‌'s answer as well.  my approach is designed to be a self-updating approach.  you could make it into a mapping table if needed. either way, i am very glad your problem was solved!