Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Writting a conditional equation to fill in gaps in a column

Hello QlikView,

I have a large data set (about 500K lines) and need help.  I have three columns of data:

Column A: Member ID

Column B: Program Name

Column C: Participation Status

One member can potentially have numerous lines of data depending on how many programs they are eligible for.  If they are eligible, that program they are eligible for will be listed in column B (Program Name) and then have a program participation status in Column C in a basic, Yes or No.

What I need is to add a column that is an overall program participation status following this definition:

If member is participating in ANY one program (Yes in Column C to any programs listed in Column B) we need a Yes to all those members records, or line items.

Can someone help me write an if, then or some sort of statement to create this?

Thank you!

1 Solution

Accepted Solutions
Not applicable
Author

Hi, Add the flag to your source data while loading if Member have completed more than one time.

Member_Map:

Mapping

LOAD Distinct

     Member ID,

     1 As AnyOneCourseFlag

From source_data where [Participation Status]='Yes'

;

Table:

LOAD

     Member ID,

     Program Name,

     Participation Status,

     ApplyMap('Member_Map',Member ID,0) As MemberOneProgramFlag

From Source;

View solution in original post

2 Replies
Not applicable
Author

Hi, Add the flag to your source data while loading if Member have completed more than one time.

Member_Map:

Mapping

LOAD Distinct

     Member ID,

     1 As AnyOneCourseFlag

From source_data where [Participation Status]='Yes'

;

Table:

LOAD

     Member ID,

     Program Name,

     Participation Status,

     ApplyMap('Member_Map',Member ID,0) As MemberOneProgramFlag

From Source;

Not applicable
Author

This works, thank you.  Now I just have to actually understand what it is doing .  Thanks again!