Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

priyarane
Valued Contributor

if condition with same value

hi Community,

I am finding the way to create 2 different attributes with same value like below.

Dim1

A

B

C

D

E

F

I am trying to create below condition based on above data(Dim1)

if(match(Dim1,'A','B','C','D'),'Cons',

if(match(Dim1,'A','B'),'AB_Cons')) as Cons_Filter

I want both to be populated Cons and 'AB_Cons' under Cons_Filter but values are filter first level itself so I am getting only 'Cons'.

Can someone please help if we have any work around to get desired values.

_priya

5 Replies

Re: if condition with same value

May be try like this

LinkTable:

LOAD 'Cons' as Cons_Filter,

     Dim1

Resident Table

Where match(Dim1,'A','B','C','D');


Concatenate(LinkTable)

LOAD 'AB_Cons' as Cons_Filter,

     Dim1

Resident Table

Where match(Dim1,'A','B');

priyarane
Valued Contributor

Re: if condition with same value

Thanks Sunny, I tried this but lot of columns I have to hard code, so do we have any other approach like by hirarchy.

Re: if condition with same value

Not sure I understand? You have to hard-code the values within the Match statement? But you were doing the same for your if statement also?

priyarane
Valued Contributor

Re: if condition with same value

it is like

under A --- ABCD

for B -- BC

For C- C

For D - DE

like that

Re: if condition with same value

Still not sure what you mean....