Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I have a straight table like this :
The metrics are from an inline table, and I have to do 10 calculations for each column.
For example, in column "CurrentMonth" I have something like this :
if ( Metrics = 'Metric1' , $(calculationMetric1CurrentMonth),
if ( Metrics = 'Metric2' , $(calculationMetric2CurrentMonth),
...
if ( Metrics = 'Metric10' , $(calculationMetric10CurrentMonth)
I got at least 1 minute to show up my calculations, because of the complexity and combination of the calculations.
Anyone knows how to do it more easily? In CPU meaning.
Many thanks in advance.
Regards, Marcel.
You can use a pick-match combination instead of the nested if:
pick(match(Metrics, 'Metric1','Metric2',....,'Metric10')
, $(calculationMetric1CurrentMonth)
, $(calculationMetric2CurrentMonth)
....
, $(calculationMetric10CurrentMonth)
)
That might improve performance a bit. No idea if it helps enough.
Thanks Gysbert, I'll try if it works better than my first way.