Spoorti K Posted June 10, 2021 Share Posted June 10, 2021 For example: From the attached dxp, We need to calculate rest of the values in Column "Value" for every next year. second value formula should be: first value in the Value column * percentage Link to comment Share on other sites More sharing options...
Shrutika Aggarwal Posted June 11, 2021 Share Posted June 11, 2021 The dxp does not seem to be attached. Could you please attach it. Link to comment Share on other sites More sharing options...
Zakir Sharief Posted June 14, 2021 Share Posted June 14, 2021 Hi Shaggarw,Please find the attached dxp file. I have written the "Calc" column in Spotfire but the values are getting calculated from the starting value (3000) not from the previous rows.Sorry I am unable to attach the dxp file. Hence attaching the calculation i did in excel and the calculation i have written in Spotfire Year Percentage Value-Manually calculated in excel Calculation in Excel 2011 3,000 2012 8% 3,240 `=C2*(1+B3) 2013 7% 3,467 `=C3*(1+B4) 2014 10% 3,813 `=C4*(1+B5) 2015 5% 4,004 Spotfire Calc - Created a Row ID column and referencing, trying to refrecing it to previous row but it calculates only based on the starting plan.case when [Year]=2011 then [base Value] else Avg([base Value]) * Sum(1 + [Percentage]) OVER (Previous([RowId])) END Year Percentage Base Value Value-Manually calculated in excel Calc RowId 2011 3,000 3000 3000 1 2012 8% 3,000 3240 2 2013 7% 3,000 3466.8 3240 3 2014 10% 3,000 3813.48 3210 4 2015 5% 3,000 4004.154 3300 5 Please let me know if you need any additional information.Thanks Link to comment Share on other sites More sharing options...
Fabian Duerr Posted June 15, 2021 Share Posted June 15, 2021 You could solve this with a simple data function. Please check the following links: https://community.spotfire.com/questions/how-use-value-n-th-row-calculated-... https://community.spotfire.com/questions/adding-value-previous-row-current-... https://community.spotfire.com/questions/self-referential-calculated-column Let me know if you need further support. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now