Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

creating a new column of data based off variables

The problem...

I created variables to represent 1 column of data (ex: vLevel1Course1, vLevel1Course2, etc). I want to be able to take a value from those fields and create a new column of data.

Example:

Level1Course1 can have the values of Y, N/A, EQ, PY in them but they can also include N. I want the new variable or column of data to only give a Y value if they have these values (Y, N/A, EQ, PY) for each course variable. I currently tried to create an IF statement but I believe I am writing it wrong. Can anyone advise?

if($(vLevel1Course1)= "Y","EQ","PY","N/A" AND if($(vLevel1Course2)= "Y","EQ","PY","N/A") "Y";"N"

1 Solution

Accepted Solutions

Re: creating a new column of data based off variables

Try like

If (not match ($(vLevel1Course1),'N') and not match ($(vLevel1Course2),'N'),'Y','N')

2 Replies

Re: creating a new column of data based off variables

Try like

If (not match ($(vLevel1Course1),'N') and not match ($(vLevel1Course2),'N'),'Y','N')

Not applicable

Re: creating a new column of data based off variables

That worked! Thank you!!

Community Browser