I am trying to write a query that gives the unit price for each hour from 2 hours up to 20 hours.
The table I am getting the information from has the prices where the unit price changes. I have attached the sample data I am working with SampleData.xlsx
I need to populate the Null values with the previous valid value. For example Hours 5,6,7,8 and 9 should show the values for the 4 hour shift, the 11 hour shift should show the value for the 10 hour shift and the values from 13 to 20 should show the values for the 12 hour shift.
The query needs to know to check for a previous valid value as it could be different shift lengths that are used as the price break points in the live data.
Thanks in advance for any help given.