Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
nazaninegogo
New Contributor III

rename fields of list box in expression

Dears

I write below expression for my list box , the issue is that I want to rename some of my fields name.

how can it possible to change them in expression directly?

expression : 

=if(Match(Area_Category,'DCB','EServices','EB','Game','Lifestyle','Money_Collection','Sport','Streaming','Traditial'),Area_Category)

Items that I want to

change:

'DB' >>> 'DEDICATED C'

'Money_collection' >> 'M Col'

 

 

Labels (2)
2 Replies
thiago_justen
Valued Contributor III

Re: rename fields of list box in expression

You can create a synthetic dimension using ValueList ().

 

For instance: ValueList('DEDICATED C','EServices','EB','Game','Lifestyle','M Col','Sport','Streaming','Traditial')

 

The problem here is that you have to apply valuelist in your expressions too.

 

You could also use Replace() function. I guess it's better option than above one. For example: Creating a master dimension like this:

If(Match(Area_Category,'DCB'),Replace(Area_Category,'DCB','DEDICATED C'),Area_Category)

 

But, of course, you strongly recommend you replace field value while scripting. Then you can use Mapping table and so on.

 

Cheers

Thiago Justen Teixeira Gonçalves
WhatsApp: 24 98152-1675
Skype: justen.thiago
robin_heijt
Contributor

Re: rename fields of list box in expression

This should work (Copy paste as 1 expression):
if(Area_Category='DCB','DEDICATED C',
if(Area_Category='EServices','EServices',
if(Area_Category='EB','EB',
if(Area_Category='Game','Game',
if(Area_Category='Lifestyle','Lifestyle',
if(Area_Category='Money_Collection','M COL',
if(Area_Category='Sport','Sport',
if(Area_Category='Streaming','Streaming',
if(Area_Category='Traditial','Traditial')))))))))