Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to create cumulative line graph
The data is like
Date Profit Capital
1/1/17 10 100
2/1/17 30 200
3/1/17 40 300
4/1/17 50 400
I want to divide Profit/Capital and want to take cumulative of that as an expression to chart.
Any suggestions?
Try this
RangeSum(Above(If(RowNo() = 1, 1, Sum(PL)/Sum(Capital)), 0, RowNo()))
May be like this
RangeSum(Above(Profit/Capital, 0, RowNo()))
if I want to sort by date in ascending order? Should i use sortable aggr?
If the sort is correct in script, then you can just use Aggr(), but if it isn't then you will have to use sortable aggr
In the expression for the first value,it should give default as 1 because there is no above value,like
RangeSum(Above(Profit/Capital, 0, RowNo()),1)
and can we use noofrows() instead of rowno()?
May be like this
If(RowNo() = 1, 1, RangeSum(Above(Profit/Capital, 0, RowNo())))
Will have to check based on your data if NoOfRows can work on not.... but why do you want to use it?
was trying out other options. Thanks
Will check with live data and mark correct answer.
=Profit/Capital + Above()
Hi Sunny,
The above expression is giving me wrong result.
I want default value for min date to be 1,and then it should accumulate.
What would the number look like for the sample data you have provided above?