Does the existing data provide a seed or default for a new row (which can be overwritten), or is it a true accumulation (which cant)? And if the latter, how much data are we talking about?
You can use lead and lag in SQL (2012) to perform these kind of projections, but if generally suggest doing it in .net, either linq or Rx, and (if necessary to store the projection for perf. reasons) just working out what is the oldest point in a sequence affected by change, and re-writing the projection from there. Alternatively, perhaps you should crack out Access? From: Stephen Price Sent: Friday, March 28, 2014 3:03 PM To: ozDotNet Hey all, Wondering if anyone has taken a spreadsheet and turned it into an app before? This spreadsheet has lots of data that used the previous row to calculate the new row's data (as spreadsheets often do). Was wondering how the best way to duplicate that functionality in a .Net app with classes/database. Possible ways I've thought of; 1. Class that calculates on the fly the desired row/year of data each time it needs it. 2. The spreadsheet takes some starting values and the applies a formula to each row, could do the same thing in memory in a lookup dictionary or similar so it only needs to be done once. 3. Alternatively put that data into tables in database... downside, if the initial value is changed it would have to find and modify the appropriate rows in the database. other ways? cheers, Stephen