Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Johnnyg248
Contributor III
Contributor III

Translate Listbox Display Value

Have a flag field in sql table that is a bit field  (value is 0 or 1)

Is it possible to "translate" the field so list box would display 'Y' or 'N'?

 

I guess could just translate in load script but just curious

 

 

Labels (1)
2 Replies
jaibau1993
Partner - Creator III
Partner - Creator III

Hi! You can translate it in the script:

LOAD
...
if(BitField = 1, 'Y', 'N') as TranslatedBitField
...

Also, you can create a calculated dimension in a chart or listbox as well (no script modifications).

Hope it helps!
Jaime.
marcus_sommer
MVP
MVP

It could be also done within the listbox by choosing an expression as source and not a field. I assume that you have multiple of such flag-fields and then a script-solution would be probably more suitable - maybe also as dual() values, like: dual('Y', 1).

- Marcus