Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Qlik Community,
I have a problem with my Data Model I can't solve by myself.
I have a table like this:
ID | Components |
1 | *A* |
2 | *A* |
3 | *B* |
4 | *B* |
5 | *A*,*B* |
6 | *A*,*B*,*C* |
7 | *A* |
8 | *B* |
9 | *C* |
and I'm Using
Pick(wildmatch(components,'*A*','*B*','*C*'),'A','B','C') as Name;
to get
Name | ID |
A | 1 |
A | 2 |
B | 3 |
B | 4 |
A | 5 |
A | 6 |
A | 7 |
B | 8 |
C | 9 |
Wildmatch only takes the first entry but I actually need all the entries in components to get a table like this
Name | ID |
A | 1 |
A | 2 |
B | 3 |
B | 4 |
A | 5 |
B | 5 |
A | 6 |
B | 6 |
C | 6 |
A | 7 |
B | 8 |
C | 9 |
am I completely wrong here with the use of wildcards? Has anybody suggestions?
@TimGl Maye be like :
load ID,purgechar(subfield(Components,','),'*') as Components;
LOAD * INLINE [
ID, Components
1, *A*
2, *A*
3, *B*
4, *B*
5, "*A*,*B*"
6, "*A*,*B*,*C*"
7, *A*
8, *B*
9, *C*
];
output:
@TimGl Maye be like :
load ID,purgechar(subfield(Components,','),'*') as Components;
LOAD * INLINE [
ID, Components
1, *A*
2, *A*
3, *B*
4, *B*
5, "*A*,*B*"
6, "*A*,*B*,*C*"
7, *A*
8, *B*
9, *C*
];
output: