This essentially creates a new dimension that aligns as follows:
blue shoes, red shoes
red shirt, blue shirt, green shirt
red shoes, blue shirt
This tags the Products with preference to the first if() clause in my expression. So if I create a drill down as Category > Products and look for "Shirts" in my categories, I won't see the "Blue Shirt" from Order 4.
Is there any approach to help me put dimensions into multiple groups, such that Order 4 would show for both Shoes and Shirts?
In reality, I have thousands of rows with many products that fall into different categories, in no particular order or predictable pattern, so I'm not sure if a mapping table would be able to predict all possible combinations. There might be 10 products in one string that apply to 5 different categories.