Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How do I create an expression that replaces more than one text in the dimension of graph?
FROM | TO |
PP | PREMIER |
AD | ADVANCE |
PS | GOLD CLASS |
PC | SUPER CLASS |
PG | GLOBAL |
I managed to make only one. How do more in the same expression?
this may help.............
// SUPPOSE THIS IS YOUR TABLE
SEGMENTO_MIS:
LOAD
FROM,
TO
from XYZ.QVD
// FOLLOWING WILL CREATE RUNTIME TABLE AND LINK WITH ABOVE TABLE ON FIELD "TO"
SEGMENTO_MIS1:
load * inline[
FROM,TO
PP, | PREMIER |
AD | ,ADVANCE |
PS | ,GOLD CLASS |
PC | ,SUPER CLASS |
PG | ,GLOBAL]; |
KINDLY CHK ATTATCHED FILE....
I would create a dummy table containing to columns, Segmento_mis with PP, AD, etc and the correct names in the other table. When loading the extra table Qlikview will automatically join the names and you can use the new column name as a dimension.
how do I create this table in the SQL query?
You can use an If statement.
If(SEGMENTO_MIS = 'PP', 'Premier',
If(SEGMENTO_MIS = 'AD', 'Advance',
If(SEGMENTO_MIS = 'PS', 'Gold Class',
If(SEGMENTO_MIS = 'PC', 'Super Class',
If(SEGMENTO_MIS = 'PG', 'Global')
)
)
)
)
Hope this help you.
Regards.-
Can do it with If statement:
FROM | TO |
PP | PREMIER |
AD | ADVANCE |
PS | GOLD CLASS |
PC | SUPER CLASS |
PG | GLOBAL |
If(SEGMENTO_MIS = 'PP', 'Premier',
If(SEGMENTO_MIS = 'AD', 'Advance',
If(SEGMENTO_MIS = 'PS', 'Gold Class',
If(SEGMENTO_MIS = 'PC', 'Super Class',
If(SEGMENTO_MIS = 'PG', 'Global')
)
)
)
)
Hope this help you.
Regards.-
Yeahhh
I did it and got:
LOAD * INLINE [
SEGMENTO_MIS, SEGMENT
PP, PREMIER
AD, ADVANCE
PS, GOLD CLASS
PC, SUPER CLASS
PG, GLOBAL
];
thanks regards
Great,
I did it and got:
LOAD * INLINE [
SEGMENTO_MIS, SEGMENT
PP, PREMIER
AD, ADVANCE
PS, GOLD CLASS
PC, SUPER CLASS
PG, GLOBAL
]
thanks regards
Great,
I did it and got:
LOAD * INLINE [
SEGMENTO_MIS, SEGMENT
PP, PREMIER
AD, ADVANCE
PS, GOLD CLASS
PC, SUPER CLASS
PG, GLOBAL
]
thanks regards
Great,
I did it and got:
LOAD * INLINE [
SEGMENTO_MIS, SEGMENT
PP, PREMIER
AD, ADVANCE
PS, GOLD CLASS
PC, SUPER CLASS
PG, GLOBAL
]
thanks regards
try...
pick(match(SEGMENTO_MIS, 'PP', 'AD', 'PS', 'PC', 'PG'),'PREMIER', 'ADVANCE', 'GOLD CLASS', 'SUPER CLASS', GLOBAL')