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

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Taylorcc
Contributor III
Contributor III

Convert Numerical Values into Text

Hello,

I have created a gender pie chart, and would like to convert the numbers to  text labels:

1 = Male

2 = Female

3 = Other

9 = Not stated/inadequately described.

 

I have tried to create a master dimension with the below with no luck:

if(gender=1,'Male',

if(gender=2,'Female',

if(gender=3,'Other',

if(gender=9,'Not stated'))

 

Thank you 

Labels (2)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

Try using dual() like:

Dual(if(gender=1,'Male',if(gender=2,'Female',if(gender=3,'Other',if(gender=9,'Not stated')))),
gender)

 

View solution in original post

1 Reply
tresB
Champion III
Champion III

Try using dual() like:

Dual(if(gender=1,'Male',if(gender=2,'Female',if(gender=3,'Other',if(gender=9,'Not stated')))),
gender)