Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to multiply a monthly volume with a monthly rate, for a certain product (X), and then sum it per quarter.
Variables as per below:
VOLUME
RATE
PRODUCT
MONTH
QUARTER
Any ideas?
Rgds,
Olle
May be this:
Sum({<Type= {'X'}>}Aggr(Sum({<Type= {'X'}>}Volume) * Sum({<Type= {'X'}>}Rate), Month))
Clarification: First I need to sum volume*rate per month.
Then sum the results by quarter
Try this may be if Quarter is your dimension:
Sum(Aggr(Sum(Volumne) * Sum(Rate), Month))
Could you post your data or qvw?
Hi Sunny,
tried the below, with Quarter as dimension.
Got zero results unfortunately. Maybe I've put the set analysis bracket incorrectly?
Sum(Aggr(Sum({<Type= {'X'}>}Volume) * Sum(Rate), Month))
Just realized one thing.
The Rate is also a sum.
So need to sum up the rate per month and product=X first as well.
May be this:
Sum({<Type= {'X'}>}Aggr(Sum({<Type= {'X'}>}Volume) * Sum({<Type= {'X'}>}Rate), Month))