Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Given a table that has a metric and a goal, and two other tables that contain some data to compute against
Lets say for metric A I need data from results A and for metric B I need data from result B
So, I am able to do this with an if statement. Something like
if(Metric = 'A',
sum(A_Measure1) / sum (A_Measure2),
if(Metric = 'B',
sum(B_Measure1) / sum (B_Measure2)))
I'm trying to figure out if there is a way to more dynamically do this instead of a huge if statement.
Maybe have the metric table have the expression embedded somehow?
Or at least a match statement of some sort?
A solution with pick and match could be this:
=Pick(Match(Metric, 'A', 'B'), sum(A_Measure1) / sum (A_Measure2), sum(B_Measure1) / sum (B_Measure2))
So in trying to make it more dynamic I concatenated all the metric name and metric definitions into variables and used them in the pick and match. Still wish there was a way to do this more built in...