Can't plot a graph to show highest and lowest products

The plot below shows the highest and lowest selling products.

Product_Quantity_in_Portugal %>%
select(Quantity, Total_Sales)

group column by

select(Quantity, Total_Sales)
group_by(Total_sales)

Sum the total no of sales using (Sum, average etc)

sunnarise (total=n ()) %>%
####creating a new variable in a new column using mutate
mutate(percent=total/sum(total)) %>%
arrange(desc(total)) %>%
ggplot(aes(x=Quantity, y=total)) +
geom_col()

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.