Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to exclude members those are...Script Question?

Hi All-Here I have attched a sample document.My objective is to exclude those menbers from script who are on Diabetics drugs.Being that said,in the final table I donot want to see SARA WHITE and TOM RICHMOND.

In the actual environment,I have 60-70 millions records in the Fact table.Please suggest all the possible options considering optimization.

Thanks-Pooja

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Attached is possible solution.

-Rob

View solution in original post

7 Replies
MayilVahanan

Hi

Try like this

member:

load * inline

[Mem_key,Mem_name,memID

M201,'Sara White',1001

M201,'Sara White',1001

M201,'Sara White',1001

M201,'Sara White',1001

M201,'Sara White',1001

M202,'Dan Hill',1002

M203,'Kelly Schmidt',1003

M204,'Tom Richmond',1004

M205,'Adam Ristow',1005]where not Match(Mem_name,'Tom Richmond','Sara White');

this doesn't load the entire row of 'Tom Richmond','Sara White'

or

member:

load *,if(not Match(Mem_name,'Tom Richmond','Sara White'),Mem_name) as Mem inline

[Mem_key,Mem_name,memID

M201,'Sara White',1001

M201,'Sara White',1001

M201,'Sara White',1001

M201,'Sara White',1001

M201,'Sara White',1001

M202,'Dan Hill',1002

M203,'Kelly Schmidt',1003

M204,'Tom Richmond',1004

M205,'Adam Ristow',1005];

to remove the 'Tom Richmond','Sara White in the Mem_name alone ..

hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Do you need to load members that have no facts, ie M205,'Adam Ristow'?

-Rob

Not applicable
Author

Yes Rob-I need to bring that record into my final script table,though I am not going to display that one in the sheet object.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Attached is possible solution.

-Rob

Not applicable
Author

Possible option

Not applicable
Author

Thanks Rob..I was thinking something like this But was stuck with where exists.Thanks again for your help!

Not applicable
Author

Thanks for your reply.I donot think it would be a good idea to bring everything to a single table where fact has more than 70 M records.left join would take time.