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

Rename the fieldnames in switch case

Hello Everybody,

          Can anyone tell me whether i can rename my fieldnames in switchcase? if yes how?where should i write the switchcase in the script or expressions tab under charts?

5 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Little more brief about your problem?

Celambarasan

vijay_iitkgp
Partner - Specialist
Partner - Specialist

You can use if condition for renaming the fieldnames. Still your question is not very clear please explain by example.

Not applicable
Author

Hi EveryOne,

     Actually i dnt want to rename fields all i want to do is write if conditions and create aliases in switch case. so is it possible?

eg if value =1  then fetch the firstname and store it as Emp_name. Here i want to check the value of an attribute and then fetch the corresponding name value and create an alias as Emp_firstname. if value is 2 then fetch the corresponding lastname and create new alias as Emp_lastname.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this

LOAD

     If(Value =1, firstname) AS Emp_firstname,

     If(Value =2, lastname) AS Emp_lastname,

     '

     '

     '

FROM Datasource;

Regards,

Jagan.

Not applicable
Author

Hi,

                         I will try and then inform. Thanks.......