hi all,
I have an inventory dataset and I need to assign rank to each product based on the presence of stock/demand/receipts/inspection etc.
Here the product can be repeated and present in one plant or in multiple plants.
I need to assign either 1 or 0 as the rank (Result).
1 --> If a product is present in the same plant or on different plants and at least one of the measure column contains a value in of its records then then we assign a value 1. if any one record in this measure columns is null and the other records has a value then 1 should be assigned.
I'm able to get the right result for the below cases.


I'm unable to get the result as 1 for the below case for the two records.

0 --> Assign 0 if there is production in one plant or on different plants or in the same plant but all measurement columns are null.
I'm able to get the right result for the below case.

Please check and help.
Thank you.
Best regards,
stj.