dataiku
I have a dataset with columns for actuals, forecast, delta (which is calculated as actuals minus forecast), segment, and date. The segment column has six categories. I want to identify the top 3 in the segment based on the delta and then create a graph in Dataiku to visualize how these categories have changed over the past 6 months. How can I accomplish this in Dataiku?
Answers
-
裕也 Partner, PartnerApplicant, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 11 Partner
Hi,
I think what you want to do could be accomplished with Prepare and TopN recipes.
First, use the Prepare recipe to extract date components that the year and month elements from the date column of your dataset. (use "Extract date elements" processor)Next, create a TopN recipe and configure the TopN steps as follows:
- Retrieve the: Set the value 3 top rows, and 0 bottom rows
- sorted by: Select a column "delta", and which is set order by desc
- from: Choose "each group of rows identified by …" and select "date_year", "date_month", and "segment".
This setting will output the top 3 delta values by year, month, and segment. In addition, the TopN recipe pre-filter can be filtered to include only records from the past 6 months.
At last, you can visualize plot in the dataset with Charts.
Best,