Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyboy,
I am a Qlikview beginner and I have this issue to submit to the community.
I have the table below File_1 with these fields ID_OPERATION, ASSOCIATION and ASSOCIATION_2 :
| File_1: | ||
| ID_OPERATION | ASSOCIATION | ASSOCIATION_2 |
| 7 | 96 | |
| 8 | 5 | 3 |
| 9 | 5 | 3 |
| 11 | 96 | |
| 12 | 110 | 110 |
| 13 | 5 | 3 |
And this second one with these fields ID and NAME:
| File_2: | |
| ID | NAME |
| 3 | ASSOCIATION |
| 5 | RSS |
| 96 | EMERGENCY |
| 110 | FRANCE |
I would like to have as final result the values in "ASSOCIATION" and "ASSOCIATION_2" replaced by the names value in the field "NAME"
As you can see, the value in "ASSOCIATION" and "ASSOCIATION_2" (File_1) are the same than values in field "ID" (File_2)
Here is the final result I would like to have
| Result: | ||
| ID_OPERATION | ASSOCIATION | ASSOCIATION_2 |
| 7 | EMERGENCY | |
| 8 | RSS | ASSOCIATION |
| 9 | RSS | ASSOCIATION |
| 11 | EMERGENCY | |
| 12 | FRANCE | FRANCE |
| 13 | RSS | ASSOCIATION |
Could you please help me with any suggestion?
Thank you so much
Bests regards
You can do it in different methods.
one method.
File_2:
Mapping LOAD * INLINE [
ID, NAME
3, ASSOCIATION
5, RSS
96, EMERGENCY
110, FRANCE
];
Result:
LOAD ID_OPERATION,
ApplyMap('File_2',ASSOCIATION,'') as ASSOCIATION,
ApplyMap('File_2',ASSOCIATION_2,'') as ASSOCIATION_2;
LOAD * INLINE [
ID_OPERATION, ASSOCIATION, ASSOCIATION_2
7, 96,
8, 5, 3
9, 5, 3
11, 96,
12, 110, 110
13, 5, 3
];
Here's another variation which I think has simpler syntax:
AssociationMap:
Mapping LOAD * INLINE [
ID, NAME
3, ASSOCIATION
5, RSS
96, EMERGENCY
110, FRANCE
];
MAP ASSOCIATION, ASSOCIATION_2 USING AssociationMap;
Result:
LOAD * INLINE [
ID_OPERATION, ASSOCIATION, ASSOCIATION_2
7, 96,
8, 5, 3
9, 5, 3
11, 96,
12, 110, 110
13, 5, 3
];
-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com
You can do it in different methods.
one method.
File_2:
Mapping LOAD * INLINE [
ID, NAME
3, ASSOCIATION
5, RSS
96, EMERGENCY
110, FRANCE
];
Result:
LOAD ID_OPERATION,
ApplyMap('File_2',ASSOCIATION,'') as ASSOCIATION,
ApplyMap('File_2',ASSOCIATION_2,'') as ASSOCIATION_2;
LOAD * INLINE [
ID_OPERATION, ASSOCIATION, ASSOCIATION_2
7, 96,
8, 5, 3
9, 5, 3
11, 96,
12, 110, 110
13, 5, 3
];
Here's another variation which I think has simpler syntax:
AssociationMap:
Mapping LOAD * INLINE [
ID, NAME
3, ASSOCIATION
5, RSS
96, EMERGENCY
110, FRANCE
];
MAP ASSOCIATION, ASSOCIATION_2 USING AssociationMap;
Result:
LOAD * INLINE [
ID_OPERATION, ASSOCIATION, ASSOCIATION_2
7, 96,
8, 5, 3
9, 5, 3
11, 96,
12, 110, 110
13, 5, 3
];
-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com
Thanks you so much!
It works for the both solutions!!!
Best regards