Grouping data for XMR

To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue?