Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
Hi,
Use "Pick match " function or "If" condition
"=pick(Match(Category,'A','B'),'Vegetable','Meat')" or
"if(Category='A','Vegetable',
if(Category='B','Meat'))"
Hello!
If you have fixed number of categories you can use input box objects that will allow user to define aliases for the categories.
Also you'll have to add a variable for each value of the category field.
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.
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)
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
Hi Jim,
This script would work.
Thanks and Regards,
Yogendra W.
Hi,
LOAD Year,
Project,
Employee,
Hours,
pick(match(Year,'2016','2017','2018'),'Yellow','Red','Blue') as Color
FROM XXXX ;
Dim:
Color
Exp:
sum(REvenue)
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