Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Increase portfolio turnover

Hi everbody,

I'm having a problem with determing the weekly increase in the portfolio turnover. I can get the figure for each week, but i also want to see the result from last week to detemine the delta (increase or decrease).

WeekTurnover portfoliolast weekDelta
451000
4611001000100
4710501100-50
4810001050-50
4911001000100
501150110050

What would be the code for the last week data. The fields i use are Week and sum(Sales) for the turnover.

Hope somebody can help me.

Thanx

Niles

1 Solution

Accepted Solutions
Not applicable
Author

Hi Niles,

I hope, it is not too late

I have done it like follows: I have load your week and Turnover in an Inline-Table called table1.

table2:

load

     week, turnover, week-1 AS pre_week

resident table1;

join load

     week - 1 AS pre_week

resident table1;

left join load

     week AS pre_week, turnover AS pre_turnover

resident table1;

Then you can sum in an pivot or sum table the turnover, the pre_turnover. For the delta you could use if(sum(pre_turnover) <> 0, Sum(tunrover) - Sum(pre_turnover)).

regards

vicky

View solution in original post

1 Reply
Not applicable
Author

Hi Niles,

I hope, it is not too late

I have done it like follows: I have load your week and Turnover in an Inline-Table called table1.

table2:

load

     week, turnover, week-1 AS pre_week

resident table1;

join load

     week - 1 AS pre_week

resident table1;

left join load

     week AS pre_week, turnover AS pre_turnover

resident table1;

Then you can sum in an pivot or sum table the turnover, the pre_turnover. For the delta you could use if(sum(pre_turnover) <> 0, Sum(tunrover) - Sum(pre_turnover)).

regards

vicky