WINDOW RECIPE - SUM

Marina_G
Marina_G Registered Posts: 2 ✭✭✭

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:

TYPEVALUEVALUE_avgVALUE_sum
A222
A32,55
B333
B548
B23,33333333310
C555

Best Answer

  • fchataigner2
    fchataigner2 Dataiker Posts: 355 Dataiker
    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

Setup Info
    Tags
      Help me…