Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have the following table:
Now I want filter the data:
I need all IDs where Product = A and Measerument = 5 and also Product = D and Measurement = 3.
In this case the result is 20.
How can I calculate the formula with set analysis, maybe with the P - function?
Thank you in advanced.
Change it from a Union to an Intersection
{<ID=P({<Product={'A'},Measurement={'5'}>}ID)*P({<Product={'D'},Measurement={'3'}>}ID)>}
{<ID=P({<Product={'A'},Measurement={'5'}>}ID)+P({<Product={'D'},Measurement={'3'}>}ID)>}
Thank you for your quick answer. Now I think the example wasn´t good enough to explain the problem.
Therefore I have added another row, with product A.
I think your solution give me also the ID 5 (last row). But I need only the IDs where equal for both products.
Change it from a Union to an Intersection
{<ID=P({<Product={'A'},Measurement={'5'}>}ID)*P({<Product={'D'},Measurement={'3'}>}ID)>}
Perfect, Thank you. I´ve never seen this union bevor.