Hi,
I am looking for a PQL code to solve the following.
We have data for multiple dimension over a period of time. I would like to get the data aggregated on one dimension per month.
All the data is within one table.
|Dim1|Dim2|Dim3| Month | KPI |
|----|-----|-----|------|---|
| A | X1 | Y1 | Jan-21 | 300 |
| A | X2 | Y2 | Jan-21 | 200 |
| A | X3 | Y3 | Jan-21 | 400 |
| A | X1 | Y1 | Feb-21 | 200 |
| A | X2 | Y2 | Feb-21 | 100 |
| A | X3 | Y3 | Feb-21 | 500 |
| B | X1 | Y1 | Jan-21 | 300 |
| B | X2 | Y2 | Jan-21 | 200 |
| B | X3 | Y3 | Jan-21 | 400 |
| B | X1 | Y1 | Feb-21 | 200 |
| B | X2 | Y2 | Feb-21 | 300 |
| B | X3 | Y3 | Feb-21 | 500 |
What I would like to get is.
jan-21
feb-21
diff.
A
900
800
-100
B
900
100
200
I have been trying with the domain table and PU functions but I was not able to make it work.
Thank you