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

extract a certain company by spec. product

Hello

I am thinking about a problem which I cannot solve. There is a list of companies and products, and I want to extract the company which have only the product 1.

It means, if they ever had product2 or 3, I do not want to see the company. Sounds easy but I couldnt get the hang of it.

e.g. I want to see only company 1, 5 and 8, because they only have product1 but none of the other products.

Background: Product 1, 2, 3 are software-Versions and I need to know which company is still on the first version. Problem is, some companies started with version 2 or 3 or have several versions.

You can find an example attached to this post. I need a list of these companies, so I need a script solution.

Thanks and best regards

Thomas

1 Solution

Accepted Solutions
swuehl
MVP
MVP

First load all companies that ever used Product 2 or 3

Exclude:

LOAD Company as CompanyExclude FROM ... WHERE match(Product, 2,3);

Result:

LOAD Company FROM .... WHERE not exists(CompanyExclude,Company);

View solution in original post

3 Replies
swuehl
MVP
MVP

First load all companies that ever used Product 2 or 3

Exclude:

LOAD Company as CompanyExclude FROM ... WHERE match(Product, 2,3);

Result:

LOAD Company FROM .... WHERE not exists(CompanyExclude,Company);

Not applicable
Author

If you want to do it in a graph I would do this:

if(Count(DISTINCT Produkt)=1 and MaxString(Produkt)='Prod1',

    MaxString([Company Name])

)

But I think that the best solution is to make it in the script load.

Not applicable
Author

thank you very much, that  does the trick.

Also to Iosu Garcia Arrieta for the graphical solution