Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. Register by February 29th to save $200. Learn More
markgraham123
Valued Contributor

Separate a field name by its value

Hi all,

I have a data set below:

ID, Name

0,A

1,A

0,B

1,B

0,C

I want to load only values which has '0' in their ID but not 1.

Req: o/p:

ID, Name

0, C

Please see the attachment.

Any help is appreciated

Thanks!

1 Solution

Accepted Solutions
Highlighted

Re: Separate a field name by its value

May be this

LOAD Name,

  ID

Where ID = 0;

LOAD Name,

  Concat(ID, ',') as ID

Group By Name;

LOAD * Inline

[

ID, Name

0,A

1,A

0,B

1,B

0,C

];

View solution in original post

3 Replies
Highlighted

Re: Separate a field name by its value

May be this

LOAD Name,

  ID

Where ID = 0;

LOAD Name,

  Concat(ID, ',') as ID

Group By Name;

LOAD * Inline

[

ID, Name

0,A

1,A

0,B

1,B

0,C

];

View solution in original post

Highlighted
annafuksa1
Contributor III

Re: Separate a field name by its value

try:

table_temp:

LOAD * Inline

[

ID, Name

0,A

1,A

0,B

1,B

0,C

];

Right join

Load max(ID) as ID ,Name

Resident table_temp

group by Name;

table:

NoConcatenate

Load * Resident table_temp

where ID =0;

drop table table_temp;

Highlighted
markgraham123
Valued Contributor

Re: Separate a field name by its value

As usual, Perfect brother!

Thanks!