Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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);
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);
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.
thank you very much, that does the trick.
Also to Iosu Garcia Arrieta for the graphical solution