Displaying 1 result from an estimated 1 matches for "accumulated_sales_share".
2017 Sep 08
0
need help for finding related sales with R
...ise("Clients_cost" = sum(Cost,na.rm = TRUE)) %>%
arrange(sales_manager, desc(Clients_cost)) %>%
group_by(sales_manager) %>%
mutate("total_sales_of_a_manager" = sum(Clients_cost),
"Accumulated_sales" = cumsum(`Clients_cost`),
"Accumulated_sales_share" =
Accumulated_sales/total_sales_of_a_manager)
%>%
ungroup() %>%
mutate("managers_ABC = if_else(Accumulated_sales_share < 0.8, "A",
if_else(Accumulated_sales_share <
0.95, "B","C")))
So, here we com...