Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is it possible to sum for several values?
I'd like to sum in an expression like this: ins + side + date = price*volume.
is that possible?
Hi,
do you mean:
'ins' & '+' & 'side' & '+' & 'date' = price*volume ?
HTH
André Gomes
not addition sorry, but when they match make a row instead of having 10 rows. Aggregate them so to speak...
is this?
TEST1:
LOAD * INLINE [
id, description
1, AB20
2, BA20
3, 20-11-16 20 pounds
4, 24-12-2015 15 pounds
5, 13 pounds
] ;
Result:
LOAD *
,
sum(id)+ sum(id) as [Price*value]
Resident TEST1;
Yes, Sum (V1 + V2). But i am not getting the expression. Ccan you please elaborate more
You mean:
LOAD * INLINE [
ins, side, date
1, 18, 19
2, 17, 19
3, 16, 19
4, 15, 19
5, 14, 19
6, 13, 19
7, 12, 19
8, 11, 19
9, 10, 19
10, 9, 19
11, 8, 19
12, 7, 19
13, 6, 19
14, 5, 19
15, 4, 19
16, 3, 19
17, 2, 19
18, 1, 19
];
SUM(ins + side + date) //would be the same as sum(38) for each line.
So look at this picture below. They all match on Date, side and Isin. So they should be in one row. Can you make an expression to make this work?
May use try with rangesum function
Hi Niklas,
Take out the dimensions apart from Date, side and Isin. If you need info from other dimensions then you need to aggregate them and put in as expression.
Cheers
Andrew
Would this work?
It basically means that aggregation is grouped over date,side and ins.
Sum(TOTAL <date,side,ins> price*volume)