Survey banner
The Dataiku Community is moving to a new home! We are temporary in read only mode: LEARN MORE

Calculating percentage individual sales based on monthly total sales

codewizard
Level 1
Calculating percentage individual sales based on monthly total sales

 

I have a dataset with two columns representing individual sales values and another column representing the month. I want to create an additional column that calculates the percentage of individual sales values relative to the total sales values for each month.

 

0 Kudos
1 Reply
louisbarjon
Dataiker

One way to do it it with 3 recipes :

  1. Create a group recipe based on the month column. Aggregate the sales by sum
  2. Create a join recipe that will join your whole dataset with the grouped dataset you just created, select left join. And join on the month
  3. Create a prepare recipe that divide the sale with the sum of sales

 

 

0 Kudos