Combining variable to obtain a Summary

Yes, it can be done. To give you more specific help, please provide a REPRoducible EXample (reprex) illustrating your issue.

If you prefer to learn on your own, you can read this free ebook