I'm trying to find the total earnings per supplier using the following code
ealing_spend %>%
group_by(`amended_supplier_name`) %>%
summarise(total_earnings = sum(`net_amount`)) %>%
arrange(desc(total_earnings))
but it keeps throwing up the total amount for the whole dataframe and not grouping by supplier. Any advice?