WINDOW RECIPE - SUM

Hello,
I'm working with the window recipe.
I have one simple dataset and i want compute sum and avg for each group.
In the window definition I set up partitioning by variable "type", and in the window aggregations I choose sum and avg for variable "value". I expect dataiku computed sum and avg for each "type" group (i.e if the rows have the same "type" i expect the same sum), instead it recalculates sum and avg for each row within the group. Can anybody help me? Here's Dataiku output:
TYPE | VALUE | VALUE_avg | VALUE_sum |
A | 2 | 2 | 2 |
A | 3 | 2,5 | 5 |
B | 3 | 3 | 3 |
B | 5 | 4 | 8 |
B | 2 | 3,333333333 | 10 |
C | 5 | 5 | 5 |
Best Answer
-
Hi,
the default for windows it to compute running sums inside each partition. If you want the overall sum and average for each partition, you need to enforce an unbounded window frame: activate the window frame, and make sure neither limit preceding nor limit following are checked
Answers
-
Thank you, it works!!!
-
Hi. I have 31 colums. Among that i need to do one column Group by and another one is Remaining_QTY column needs to know Sum. I have used window recipe. But i did not see correct values.
could you help me.
-
Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,329 Dataiker
Hi @U125829 ,
As this is a new question, it's best to start a new post or contact us through your preferred channel seehttps://doc.dataiku.com/dss/latest/troubleshooting/obtaining-support.html
Given the nature of the issue, it would be best to contact support so we can review and assist with the issue.