Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
hkg_qlik
Creator III
Creator III

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
jonathandienst
Partner - Champion III
Partner - Champion III

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

View solution in original post

3 Replies
Not applicable

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.

jonathandienst
Partner - Champion III
Partner - Champion III

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
jonathandienst
Partner - Champion III
Partner - Champion III

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