Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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

Increase portfolio turnover

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

1 Reply
Not applicable

Increase portfolio turnover

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