For example if the candidate is in the “Application Review” stage they are at the “Application” milestone
However if they are in the “Second Stage” for example the milestone is blank and I need to return the previous milestone entry based on the job stages order. So in this example I need to return the milestone as “Assessment”. The table is linked on “Jobs Stages Job ID” and “Jobs Stages Stages ID”
I’m struggling to work out how to do this in SQL so any help/advice would be much appreciated.
Check out sql lag window function, coalesce won’t work across rows. You would be better just creating a mapping table to fill the gaps though if it is a consistent process.
I came across this post, I think it is exactly what you need!
[Display Null values as previous value until next non-null value is encountered](https://discourse.looker.com/t/display-null-values-as-previous-value-until-next-non-null-value-is-encountered/7644) Table Calculations
Hi, Can someone please help: I am trying to replace consecutive null values in a pivot by a value from the row above null. I tried using offset function but it fills up only for the next immediate value and skips the rest. Any help is appreciated. Thanks