why is group_by not showing in the pivot table i'm trying to make?

31 Views Asked by At

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?

0

There are 0 best solutions below