916238 wrote:That could be the answer: LAST_VALUE (... IGNORE NULLS ) to be precise.
... I tried a couple of different methods like Last_Value()
but i have group by in my original statement and i think analytical functions dont like GROUP by if they are not part of it. How can i achieve this?Analytic functions are computed after the GROUP BY clause is finished. Yes, the GROUP BY does restrict what you have available, but if a value is in your SELECT clause, then you can call an analytic function on it. I can show you exactly what I mean after I get the information in the first paragraph above.
max(Value_2011) keep (dense_rank Last order by Month_ID nulls first)