Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Replace more than one dimension text in the graph

How do I create an expression that replaces more than one text in the dimension of graph?

 

FROMTO
PPPREMIER
ADADVANCE
PSGOLD CLASS
PCSUPER CLASS
PGGLOBAL

I managed to make only one. How do more in the same expression?

help.PNG

1 Solution

Accepted Solutions
Not applicable
Author

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....

SCRIPT.JPG

SHEET.JPG

View solution in original post

18 Replies
Not applicable
Author

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.

Not applicable
Author

how do I create this table in the SQL query?

Not applicable
Author

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.-

Not applicable
Author

Can do it with If statement:

FROMTO
PPPREMIER
ADADVANCE
PSGOLD CLASS
PCSUPER CLASS
PGGLOBAL

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.-

Not applicable
Author

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

Not applicable
Author

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

Not applicable
Author

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

Not applicable
Author

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

Not applicable
Author

try...

pick(match(SEGMENTO_MIS, 'PP', 'AD', 'PS', 'PC', 'PG'),'PREMIER', 'ADVANCE', 'GOLD CLASS', 'SUPER CLASS', GLOBAL')