Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jim_chan
Specialist
Specialist

Pie Chart- how to change given data name to another name?

Hi guys,

I have created a pie chart and added sample data in it.  - as per attached qvw.

my scenario, the i have a category column, showing A and B data. But at the font end(visual), user would want to replace the data A name to another name, for exmaple: change A to Vegetable, B to Meat.

So, how can i do that at the front end, in the pie chart properties?

screenshot4.jpg

8 Replies
Anonymous
Not applicable

Hi,

Use "Pick  match " function or "If" condition

"=pick(Match(Category,'A','B'),'Vegetable','Meat')"  or

"if(Category='A','Vegetable',

if(Category='B','Meat'))"

Sergey_Shuklin
Specialist
Specialist

Hello!

If you have fixed number of categories you can use input box objects that will allow user to define aliases for the categories.

user_categories.png

Also you'll have to add a variable for each value of the category field.

Anonymous
Not applicable

Hi Jim,

You can rename at back-end script or you can use pick and match combination at front-end using Inline table.

Thanks and regards,

Yogendra W.

chinnuchinni
Creator III
Creator III

Hi Jim,

As @ yogendra said,if you have fixed number of dimension values,you can use pick & match function in dimension , like below.

Dim:

=pick(match(Year,'2016','2017','2018'),'Yellow','Red','Blue')

Exp:

=sum(revenue)

jim_chan
Specialist
Specialist
Author

Hi Yogendra,

how to write at the back end script??? is it same as =pick(match(Year,'2016','2017','2018'),'Yellow','Red','Blue')  ??


rgds


Jim

Anonymous
Not applicable

Hi Jim,

This script would work.

Thanks and Regards,

Yogendra W.

chinnuchinni
Creator III
Creator III

Hi,

LOAD Year,

     Project,

     Employee,

     Hours,

     pick(match(Year,'2016','2017','2018'),'Yellow','Red','Blue') as Color

FROM XXXX ;

Dim:

Color

Exp:

sum(REvenue)

jim_chan
Specialist
Specialist
Author

Hi sergey,

Thanks for your effort , although this is not what the user is expecting.... However, is great to know it can be done such a way, at least i can provide an option for the users to choose.

Thanks Sergey, i will definitely share it with my users.

Rgds

Jim