Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

loveqliksense
New Contributor III

Flag in Qliksense

Hi all,

I have a table X in the script.

X:

  LOAD ID,

       $(vY);

  SQL SELECT ID",

      $(vY)

  FROM  NameLevel ;

$(vY) gives me the columns as shown

   

ID

NameL1
L1G1
L1Flag1
NameL2
L2G2
L2Flag2
NameL3
L3G3
L3Flag3
NameL4
L4G4
L4Flag4

   

And data is shown below:

Flag4.PNG

I have to add a condition in the script where the highlighted data will be null if Flag=1.Here highlighted data in NameL2,L2G2,NameL3,L3G3,NameL4,L4G4 should be replaced by null if Flag=1

How can I do it in  back end script. I cannot do this from frontend as there are multiple schema and logic should work on all.

Thanks

in advance

2 Replies
Employee
Employee

Re: Flag in Qliksense

Dear Love,

You can change your current variable including the if statement $(vY), or you could create a secondary variable including your conditions like $(vYrules) that contain the rules.

Ricardo Gerhard
OEM Solution Architect
LATAM
loveqliksense
New Contributor III

Re: Flag in Qliksense

Dear Ricardo,

If I have to use the same variable how should the if condition look like in the script? There is no other rule than having flag =1

Community Browser