Hi,
i have an input table like this.
Date | Category | Count | Offset | Total |
Q4 2015 | D | 9 | | |
Q1 2016 | A | 9 | | |
Q1 2016 | B | 3 | | |
Q1 2016 | C | 8 | | |
Q1 2016 | D | 7 | | |
Q2 2016 | A | 7 | | |
Q2 2016 | B | 5 | | |
Q2 2016 | C | 2 | | |
Q2 2016 | D | 7 | | |
i need to calculate the columns Offset and total. the logic for which are as follows
Total (calculated each quarter) | Value D of previous Qtr + value A of current \Qtr |
Column Offset (for each category each quarter) |
offset of A | Total- A for current Qtr |
Offset of B | Total - B For Current Quarter |
Offset of C | Total - B - C |
Offset of D | Always 0 |
I need to create a dynamic logic for this, as data for more years may come.
They can be calculated in script or via expressions.
Please suggest. thanks in advance.
Regards
Vidit