Hi, and welcome!
Please see the FAQ: What's a reproducible example (`reprex`) and how do I do one? Using a reprex, complete with representative data will attract quicker and more answers.
Dave, having to reverse engineer a problem from a general description can be a big deterrent. Even someone like me, who is not a bright shiny
object may be able to help out. But otherwise, the best that can be hoped is to attract the eye of someone who's had the similar challenge, and that requires being lucky with the question title.