Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

robin_heijt
Contributor

Rename a field name based on another field

Hi,

LOAD

    "Employee Global ID",

    "Employee Global ID" as "Personal ID Movement",

    Capitalize(Name) as "Full Name OPR",

    "Organization & Hierarchy",

    "Position & Hierarchy",

    "Manager Employee ID",

    Manager,

    "Preliminary OPR Rating",

    "Manager Comments",

    Keepchar("Last Published OPR Rating",'4A4B3A3B21A1B') as "OPR 2018",

    "OPR Rating Scale",

    "Year",

    "Plan Name"

The field year contains years from 2007 till 2018

The rating scale contains scores all the scores from every year, meaning that every person will have multiple lines in the table.

I would like to create a sort of IF statement that will create "OPR 2007", 2008, 2009 etc... based on the year and OPR Rating scale.

So e.g. finally I will have a field called OPR 2017 derived from the score in "OPR Rating Scale" based on the year 2017 in "Year" and this for every year.

Can anyone please advise on how to do this?

Thanks.

1 Solution

Accepted Solutions
YoussefBelloum
Esteemed Contributor

Re: Rename a field name based on another field

Hi,

you should be able to do this by making tests on the readed year, like this:

if(Year=2007, "OPR Rating Scale") as OPR_2007 etc

3 Replies
YoussefBelloum
Esteemed Contributor

Re: Rename a field name based on another field

Hi,

you should be able to do this by making tests on the readed year, like this:

if(Year=2007, "OPR Rating Scale") as OPR_2007 etc

robin_heijt
Contributor

Re: Rename a field name based on another field

Of course, completely slipped my mind.

Thank you!

YoussefBelloum
Esteemed Contributor

Re: Rename a field name based on another field

you're welcome