Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

I would like a chart legend to show Yes, No, N/A for values 1,0, and 2. How and where can this be set?

I have a field that contains the values 0,1,or 2 that correspond to No, Yes and N/A. I have that field in a pie chart and the legend displays 0,1, and 2. How can I change the legend to display something more meaningful like 'Yes', 'No', or 'N/A' instead. How would I accomplish this.

1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

Hi,

if you want this in script level, try this

Load *,if(check=0,'No',if(check=1,'Yes',if(check=2,'N/A'))) as flag;

LOAD * INLINE [

    Value, check

    100, 0

    200, 1

    300, 2

];

If you want that in front end, try to add the calculated dimension like

=if(check=0,'No',if(check=1,'Yes',if(check=2,'N/A')))

sample attached for your reference.

View solution in original post

5 Replies
Gysbert_Wassenaar

Create a small table in the script before you load the table with the field that contains the 0,1 and 2 values:

TableX:

LOAD Dual(TextValue,MyField) as MyField INLINE [

MyField, TextValue

0, Yes

1, No

2, N/A

];

TableY:

LOAD

     MyField,

     OtherFields

FROM .... ;

What this will do is create values in TableX that are numbers that also have a textual display value. The numbers from the field MyField from TableY will also get this textual display value when you load them.


talk is cheap, supply exceeds demand
settu_periasamy
Master III
Master III

Hi,

if you want this in script level, try this

Load *,if(check=0,'No',if(check=1,'Yes',if(check=2,'N/A'))) as flag;

LOAD * INLINE [

    Value, check

    100, 0

    200, 1

    300, 2

];

If you want that in front end, try to add the calculated dimension like

=if(check=0,'No',if(check=1,'Yes',if(check=2,'N/A')))

sample attached for your reference.

Not applicable
Author

Hi….worked beautifully as a calculated dimension

settu_periasamy
Master III
Master III

Hi,

if it is worked,

Could you please close this thread Mark as  Correct / Helpful answer?

Not applicable
Author

sure