Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

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

Rename the fieldnames in switch case

Hi,

     Little more brief about your problem?

Celambarasan

vijay_iitkgp
Valued Contributor

Rename the fieldnames in switch case

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

Not applicable

Rename the fieldnames in switch case

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.

MVP
MVP

Rename the fieldnames in switch case

Hi,

Try this

LOAD

     If(Value =1, firstname) AS Emp_firstname,

     If(Value =2, lastname) AS Emp_lastname,

     '

     '

     '

FROM Datasource;

Regards,

Jagan.

Not applicable

Rename the fieldnames in switch case

Hi,

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

Community Browser