Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

hkg_qlik
Contributor II

Conditional Flag

Hi,

I have a table with Member ID as field name. Now I want to flag those Member ID's which are repeated in the table (More than once) while loading the table.

Regards,

H

1 Solution

Accepted Solutions
MVP
MVP

Re: Conditional Flag

Hi

Something like this:

LOAD MemberID,

     If(Exists(MemberID), 1, 0) As RepeatFlag,

     ...

From Table;

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
3 Replies
Not applicable

Re: Conditional Flag

While loading the table, order by Member ID, assign 1 to Flag, peek previous Member ID, if it matches the current Member ID, increment Flag by 1 else next Member ID.

MVP
MVP

Re: Conditional Flag

Hi

Something like this:

LOAD MemberID,

     If(Exists(MemberID), 1, 0) As RepeatFlag,

     ...

From Table;

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
MVP
MVP

Re: Conditional Flag

Or something like this (after having loaded the data into a resident table):

Join(Table)

LOAD MemberID,

     Count(MemberID) As IDCount,

Resident Table

Group By MemberID;

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Community Browser