Group by on multiple layer on table

Am new in R Currently am working on R Markdown , i have data frame includes Aggregation column ( Total) i want to plot a table with multiple group by , and the statiscs shall be the sum for the total column , like pivot table Can you help

Am using R Markdown

Expected result
IMG-20240118-WA0003

The code i used :
df_1 <- OrPatientTotals %>%
filter(DomainID==1) %>%
group_by(DisplayEn) %>%
summarise(SumTransactions = sum(TotalTransactions))

We really need to see your raw data.

A handy way to supply some sample data is the dput() function. In the case of a large dataset something like dput(head(mydata, 100)) should supply the data we need. Just do dput(mydata) where mydata is your data. Copy the output and paste it here between
```

```

For general information see FAQ Asking Questions

This topic was automatically closed 42 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.