Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello every one please go through the attached sample file. It has all details you need.
I am still not sure what needs fixing. Are you only trying fix YearGap = 0 or is the whole thing not working?
Now Select Year 2011. Count for 0 year gap is 3. ID 1,2,3 is counted. But it should be 0 count since these ID 1,2,3 is included in Year gap 1.
I am starting to understand this better now. Can you give an example where yeargap will have a value to show?
I am glad one of us is
Here comes the solution Use of Aggr function and excluding already included ID.