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.

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

Re: Writting a conditional equation to fill in gaps in a column

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;

2 Replies
Not applicable

Re: Writting a conditional equation to fill in gaps in a column

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

Re: Writting a conditional equation to fill in gaps in a column

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