Is it possible to create a report that can have different group(aggregation) view based on a choice list selection (name Group By )

Is it possible to create a report that can have different group(aggregation) view based on a choice list selection (name Group By ),

E.g: let's say the report has columns like this: Location parent, Location child, number of users.

And a dropdown on the filter named Group by.

So what I wanted to do is by selecting the Group by to Location parent, I wanted to display the number of users on that parent selection hiding Location Child column field. And Selecting Group by/aggregation to Location Child , I wanted to group by Location Child.

I don't think this is possible. This scenario is typically handled by creating a separate report for each level of aggregation you need (I know that's not great).