Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
marcel_olmo
Partner Ambassador
Partner Ambassador

Bunch of metrics in a straight table goes very slow

Hi guys,

I have a straight table like this :

Grapphic.PNG

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.

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

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.


talk is cheap, supply exceeds demand
marcel_olmo
Partner Ambassador
Partner Ambassador
Author

Thanks Gysbert, I'll try if it works better than my first way.