This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Thanks for the reply. I already have sales summarized by week. I am trying to get a new column that sums the 4 weeks sales up to and including that week. Please see below for an idea of what I am trying to achieve.
If the amount of information you are working on IN-DB is not too large you can use the in-out Multi-Row-Formula tool. The problem you will have to get out of the IN-DB ambienge. Da to do a parameterized sql to generate this calculation on extraction. Here's an example with the multi row tool.
The query below can be used either directly from the IN-DB Connection tool or from the dymamic input in-DB tool. It may be an idea for the new appointments.
select WEEK as WEEK, max(SALES) as SALES, sum( (select sum(SALES) from TABLE_SNOWFLACK B where B.week between (A.WEEK -3) and A.WEEK))as SALESWEEK4 from CTABLE_SNOWFLACK A where WEEK between (A.WEEK -3) and A.WEEK group by WEEK order by WEEK