Agreed … a PBIX would help greatly. In the meantime, and without any background, here’s the basics of using a disconnected table in a dynamic grouping technique that, once extended, could possibly get you where you want without a SWITCH statement.
Good luck.
Greg