month max row

Options
codewizard
codewizard Registered Posts: 6

i have a column, which is month (202301 format) i wnat to create another column names max month in the table whihc displays the max month of month row how to create it ?

Answers

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,708 Neuron
    Options

    From your last dataset create a new Group By recipe. Select month as the Group By to be able to create the recipe. Now while on the Group By recipe remove the month as the group key and in the "Per field aggregations" select Max on Month. Now uncheck "Compute count for each group" as well. Run the recipe and explore the output dataset, you should have a single row/column dataset with the max of your month. Now go back to the flow and multi-select (holding the control key) the original dataset and the new group by dataset and click on the Join recipe. Create the Join recipe and change the join type to Cross Join (cartesian join). Run the recipe and you will have a new max month column added to your dataset. The flow should look like this:

    Screenshot 2024-06-14 at 10.45.27.png

Setup Info
    Tags
      Help me…