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?
try...
pick(match(SEGMENTO_MIS, 'PP', 'AD', 'PS', 'PC', 'PG'),'PREMIER', 'ADVANCE', 'GOLD CLASS', 'SUPER CLASS', GLOBAL')
try....
pick(match(SEGMENTO_MIS, 'PP', 'AD', 'PS', 'PC', 'PG'),'PREMIER', 'ADVANCE', 'GOLD CLASS', 'SUPER CLASS', GLOBAL')
try
pick(match(SEGMENTO_MIS, 'PP', 'AD', 'PS', 'PC', 'PG'),'PREMIER', 'ADVANCE', 'GOLD CLASS', 'SUPER CLASS', GLOBAL') in your table where you've used the Replace().
Hi,
You can create dummy table
Load * inline[SEGMENTO_MIS,SEGMENTOMISFULLNAME
AD, Advance
PP, PREMIER
PS, GOLD CLASS
PC, SUPER CLASS
PG, GLOBAL];
or
use calculated dimension
=Pick(Match(SEGMENTO_MIS,'AD', 'PP', 'PS', 'PC', 'PG'),'ADVANCE','PREMIER','GOLD CLASS', 'SUPER CLASS', 'GLOBAL')
Celambarasan
To start with, you can create an excel file with the two columns and load it in your script after the connect and sql statements.
Else you can create the table by using the INLINE function
Tab1:
Load * Inline [
Segmento_mis, Segmento_mis_Name
PP PREMIER
AD ADVANCE
PS GOLD CLASS
PC SUPER CLASS
PG GLOBAL
] (delimiter is '\t');
Either create an excel table with the two columns and load it after the SQL statement, or create an inline table
Tab1:
Load * Inline [
Segmento_mis Segmento_mis_name
PP PREMIER
AD ADVANCE
PS GOLD CLASS
PC SUPER CLASS
PG GLOBAL
] (delimiter is '\t');
Hey,
If those are the only possible values for SEGMENTO_MIS, you can use this load statement:
SegmentoMisNames:
LOAD * INLINE [
SEGMENTO_MIS, SEGMENTO_MIS_NEW
PP, PREMIER
AD, ADVANCE
PS, GOLD CLASS
PC, SUPER CLASS
PG, GLOBAL
];
You can then use the SEGMENTO_MIS_NEW field as the dimension for your graph.
-Teemu
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....
Thanks very much for complete answer.