Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to get a rolled up sum from a column which is a multiplication of values from two other columns.
Below is my sample table,
Year | Quarter | Id | Rate | Index | Rate*Index |
---|---|---|---|---|---|
2015 | Q1 | 1 | 0.1 | 0.9 | 0.09 |
2015 | Q1 | 2 | 0.2 | 0.4 | 0.08 |
2015 | Q1 | 3 | 0.5 | 0.3 | 0.15 |
2015 | Q1 | 4 | 2 | 2 | 4 |
2015 | Q1 | 5 | 5 | 2 | 10 |
2015 | Q1 | 6 | 2 | 3 | 6 |
2015 | Q1 | 7 | 1 | 4 | 4 |
2015 | Q1 | 8 | 2 | 3 | 6 |
2015 | Q1 | 9 | 2 | 3 | 6 |
SUM | 36.32 |
And here is what I am trying to achieve,
Year | Quarter | Rate*Index |
---|---|---|
2015 | Q1 | 36.32 |
2014 | Q1 | XXXX |
I tried something like SUM(AGGR(Rate*index),Id) but it didn't work. Can someone please help me with this one?
Thanks!
Create a straight table, add year and quarter as dimnsion and write Sum(Rate*Index) as expression
Let me know
Hi ,
Try below expression:
AGGR(Sum([Rate*Index]),Year,Quarter)
Thanks,
Shekar!!!
Hi,
Attached the sample QVW.
Try this..
Hi,
I hope it will help to complete the task
dimension:year and quarter
expression:sum(Rate*Index)
Thanks and regards,
Balaji.k
Thanks Shekar, that helped!