Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the data as given below. TagName_Seperated column is derived from Subfield(TagName_Original,',') for one of the requirement. I want both TagName_Original and TagName_Seperated on list box filter.
When multiple values are selected in TagName_Seperated filter, I want TagName_Original to show based on AND condition.
Example 1: When 'P&B' and 'M&S' is selected in TagName_Seperated filter, TagName_Original should show only 'PRB,M&S,Support ' because both 'PRB and M&S' is available only in this. Usually Qlik shows all the 4 values because PRB or M&S value is available in all 4.
Example 2: When 'M&S' and 'Maintenance' is selected in TagName_Seperated filter, TagName_Original should show both 'M&S,Maintenance' and 'Maintenance,M&S,Support' in TagName_Original list box because both keywords are available in 2 values.
Data:
| PRB_Number | TagName_Original | TagName_Seperated |
| PRB1 | PRB,M&S,Support | PRB |
| PRB1 | PRB,M&S,Support | M&S |
| PRB1 | PRB,M&S,Support | Support |
| PRB2 | M&S,Maintenance | M&S |
| PRB2 | M&S,Maintenance | Maintenance |
| PRB3 | PRB,Automation,Testing | PRB |
| PRB3 | PRB,Automation,Testing | Automation |
| PRB3 | PRB,Automation,Testing | Testing |
| PRB4 | Maintenance,M&S,Support | Maintenance |
| PRB4 | Maintenance,M&S,Support | M&S |
| PRB4 | Maintenance,M&S,Support | Support |
| List Box1: TagName_Seperated |
| PRB |
| M&S |
| Support |
| Maintenance |
| Automation |
| Testing |
| List Box 2: TagName_Original |
| PRB,M&S,Support |
| M&S,Maintenance |
| PRB,Automation,Testing |
| Maintenance,M&S,Support |
You might be able to create a master dimension using a set expression.
If you have a limited number of tags per item, you could separate all combinations into multiple fields and use multiple filters:
| PRB_Number | TagName_Original | TagName_Seperated_1 | TagName_Seperated_2 | TagName_Seperated_3 |
| PRB1 | PRB,M&S,Support | PRB | M&S | Support |
| PRB1 | PRB,M&S,Support | PRB | Support | M&S |
| PRB1 | PRB,M&S,Support | M&S | PRB | Support |
| PRB1 | PRB,M&S,Support | M&S | Support | PRB |
| PRB1 | PRB,M&S,Support | Support | PRB | M&S |
| PRB1 | PRB,M&S,Support | Support | M&S | PRB |
| PRB2 | M&S,Maintenance | M&S | Maintenance | - |
| PRB2 | M&S,Maintenance | Maintenance | M&S | - |
| PRB3 | PRB,Automation,Testing | PRB | Automation | Testing |
| PRB3 | PRB,Automation,Testing | PRB | Testing | Automation |
| PRB3 | PRB,Automation,Testing | Automation | PRB | Testing |
| PRB3 | PRB,Automation,Testing | Automation | Testing | PRB |
| PRB3 | PRB,Automation,Testing | Testing | PRB | Automation |
| PRB3 | PRB,Automation,Testing | Testing | Automation | PRB |
| PRB4 | Maintenance,M&S,Support | Maintenance | M&S | Support |
| PRB4 | Maintenance,M&S,Support | Maintenance | Support | M&S |
| PRB4 | Maintenance,M&S,Support | M&S | Maintenance | Support |
| PRB4 | Maintenance,M&S,Support | M&S | Support | Maintenance |
| PRB4 | Maintenance,M&S,Support | Support | Maintenance | M&S |
| PRB4 | Maintenance,M&S,Support | Support | M&S | Maintenance |
We have to show single filter for the column TagName_Seperated and we have multiple tags for each record.
I think there is no direct possibility to show such a derived selection which didn't really exists. Sense don't support an AND mode and I assume that the given data-structure would conflict with this feature.
An indirect way to filter the data-set with the described AND logic could be to include a count-condition, maybe like:
aggr(if(count(distinct TagName_Separated) >= getselectedcount(TagName_Separated);
TagName_Original), TagName_Original)
Much simpler would be to select directly the wanted data-set with a search-string, like:
*PRB*M&S*