evaluating value in previous record of same field

brett.spector null
Occasional Contributor

I have a query - and I am happy to implement this in the data model as that is where it is loaded to - so either in a custom column in the query tool or a column added in the data model, I don't care either way - but it need to be in load to data model only because it is more than 1 million rows.  If the record set was within the tab limit of excel I could easily implement this in the tab itself and then just make a query from the table.  


So, assume 2 columns - 1 is from the data source one is my new column



Datasource      NewColumn

null                     NewColumn

null                     NewColumn

1034                  1034

null                    1034

null                     1034

2234                    2234

null                      2234

null                      2234


So essentially I want to write a formula in NewColumn that says if DataSource is null then take the preceding record value of NewColumn otherwise take DataSource.


Anyone please help - even Bueller!



1 Reply

You can do it in-place using  fill -> down (under any column) or duplicate the column and then use fill -> down 

Related Conversations