If you can please share a pbix file with part of sample data for test. It should be help for testing and coding formula. BTW, I'm not so recommend you to use switch function to handle with summarize records. It not suitable for split summarize records to multiple part.
Community Support Team _ Xiaoxin Sheng If this post helps, please consider Accept it as the solution to help the other members find it more quickly Learning resources: Power BI