Forum Discussion
solution for the First time name and has targeted value
- 7 years ago
Hi IsaLe
Is this problem sloved?
If it is sloved, could you kindly accept it as a solution to close this case?
If not, please let me know.
Best Regards
Maggie
Hi Maggie,
table 1 and table 2 is One to Many relationship. In the original table, table 1 is about date and table 2 is about product. It is linked by the commun column 'week of date' in the format of DD/MM/YYYY.
Anyhow, i managed to do it but i dont think it is the best way to do it. What i did was
- Use GROUPBY function to find a first week of every product (in our context, the minimun number of each 'name')
- Use IF to check if the result of the previous function is equal to 10 then it is what iam looking for.
As you see, use GROUPBY and IF it is a 2n computation time.
If you know a logic how to get a result of all the name, which appear only one time. Then i ll compare it to number 10. it ll be a better solution in term of complexity.
thanks