You can create a custom filter to filter out the items based on your grouping.
Create a line item formatted by grouping to which will be published on module. In another Boolean line item in your module with data put a formula to compare whether the grouping line item matches with the user input module.
Use the Boolean to filter your view. this way you can publish the grouping as an selector on module and filter the data with that.
We created a new module with grouping as a drop down and created a Boolean in the main module to match this page selector selection in my new module with my main module grouping line item(formula derived grouping format).