Passing a variable that dynamically changes the dimension name
The title may seem a bit confusing so I apologize in advance.
I am trying to achieve the ability to pass a variable into another variable that will dynamically change the revenue data depending on the region.
I have 5 dimensions: [LA-Level], [NYC-Level],[BOS-Level], etc.. Each dimensions have 5 values in them, for example LA-Level has 1, 2, 3, 4, 5. Now, I want to find the sum of the sales for the LA-Level 1-5 in one shot so that it populates onto my straight table.
I am able to get the sales and placed that into a variable. How do I go about setting up a variable so that it dynamically changes for the levels 1-5?
here are some additional thoughts. would it make sense to set a variable with a regex so that I do a wild search for anything after a "*-Level"? then pass that into my other variable so that it gives me the sum of sales for that region broken into the 5 levels? This is where I am having trouble in understanding the optimized way to set this up.
I want to create a variable first that may include subfield of finding everything after -Level so that I can dynamically change that variable for the different regions (this will all be controlled through the usage of buttons - which also uses a variable), then pass this variable into my 2nd variable which will have an expression for the sum of sales given the condition of the first variable created.
Apologize for the long post and I hope this made sense. Please let me know if I can further clarify my issue.