How to find a dyanic mean of column in Formula in prepare recipe

NilamberPanda Partner, Dataiku DSS Core Designer, Dataiku DSS Core Concepts, Registered Posts: 9 Partner

I have 3 columns Average transaction value, frequency and lifespan. I am trying to do a maths formula in prepare recipe by multiplying

Average transaction value* frequency * average (lifespan)

How can I calculate the average(lifespan) dynamically in the prepare recipe formula itself?


  • fchataigner2
    fchataigner2 Dataiker Posts: 355 Dataiker


    if by "average(lifespan)" you mean "average on some group of rows" (maybe on the full dataset), then you need to use the Window recipe.

    The Prepare recipe operates purely row-by-row, and to compute values on group of rows you need to either do a Group recipe then join back the aggregates on the data, or use a Window recipe to do it in one go.

Setup Info
      Help me…