Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have data in excel like below. how to get that output column in qvw
MonthYear | CardYear | CardMonth | os | cs | running total | output |
Jan-14 | 2014 | 1 | 10 | 29 | -19 | (running Total+os)-cs |
Feb-14 | 2014 | 2 | 3 | 25 | -22 | -41 |
Mar-14 | 2014 | 3 | 6 | 19 | -13 | -35 |
Apr-14 | 2014 | 4 | 4 | 24 | -20 | -33 |
May-14 | 2014 | 5 | 11 | 28 | -17 | -37 |
Jun-14 | 2014 | 6 | 11 | 24 | -13 | -30 |
attaching excel file also.
please suggest guys.
formula I have mentioned in excel sheet.
Like this?
try this in script:
Previous([running total])+os-cs as OutputNew
Data:
Load
Date#(MonthYear,'MMM-YY') as MonthYear,
CardYear,
CardMonth,
os,
cs
Inline
[
MonthYear CardYear CardMonth os cs
Jan-14 2014 1 10 29
Feb-14 2014 2 3 25
Mar-14 2014 3 6 19
Apr-14 2014 4 4 24
May-14 2014 5 11 28
Jun-14 2014 6 11 24
] (delimiter is \t);
Dimension
MonthYear
Expresssions
SUM(os)
SUM(cs)
SUM(os)-SUM(cs)
Above(SUM(os)-SUM(cs)) + SUM(os) - SUM(cs)
I have achieved desired output using this formula.
=RangeSum(Above(TOTAL Column(1) - Column(2), 0, NoOfRows(TOTAL)))
how can I include monthyear field in this , so that upon selection of monthyear this column should change.