Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Prasad12
Contributor
Contributor

Selection Part

We have a case: There are different programs and products, each program can have different products like as shown below:

In the below case I need a script to select only the programs having Yes/No and the blanks should be neglected. Please help me with this it will be very helpful for me.

Products Program1 Program2 Program3
1 A-yes    
2   B-Yes/No  
3     C-Yes/No
4 A-No    
Labels (1)
1 Reply
RafaelBarrios
Partner - Specialist
Partner - Specialist

Hi @Prasad12 

If you want to do that in script, you could add a where condition to your load to do the first cleaning and then clean all loaded fields.

something like:

load
Products,
If(Wildmatch(Program1,'*Yes/No*'),Program1) as Program1, 
If(Wildmatch(Program2,'*Yes/No*'),Program2) as Program2,
If(Wildmatch(Program3,'*Yes/No*'),Program3) as Program3

From <your table>
where
Wildmatch(Program1,'*Yes/No*') or
Wildmatch(Program2,'*Yes/No*') or
Wildmatch(Program3,'*Yes/No*');

 

if could be yes or no change the wildmatch to

Wildmatch(Program1,'*Yes*','*No*')

 

it could have some syntax errors as I couldn’t tried, but I hope you got the idea.

best,

Help users find answers! Don't forget to mark a solution that worked for you & to smash the like button! 🙂