Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ivan_will
Partner - Creator II
Partner - Creator II

Interpret Field Values as FORMULAS in a chart (without using pick func.!)

Hello all,

I have the following set:

QV.png

Till now I am using:   Pick( Match(KBI, $(vFormulaKBIs) ),$(vExt_Formula)  ) 

where in the $(vFormulaKBIs) I have concatenated all KBIs' names and in $(vExt_Formula)  all corresponding formulas from the Complex Formula field.

The above method works BUT for each KBI it calculates all the expressions and this decrease the performance in times.

(I have another KBIs which are not calculated by this formula but use rangesum between both formulas). And as you know if you use pick and if some of the expressions is wrong  it will destroy all your reports as it will return error.

So what I want to have now is to to interpret the Complex Formula for each row where it is needed!

I have tried a lot of different ways but didn't managed to make it working!? Fieldvalue, fieldindex, ....

If someone has an idea I will be grateful!

Thanks

13 Replies
tresesco
MVP
MVP

The above method works BUT for each KBI it calculates all the expressions and this decrease the performance in times.

(I have another KBIs which are not calculated by this formula but use rangesum between both formulas). And as you know if you use pick and if some of the expressions is wrong  it will destroy all your reports as it will return error.

I can think of this Pick(Match(...    approach to be suitable one. And didn't quite agree with your opinion highlighted above (if I have not misuderstood your point).

ivan_will
Partner - Creator II
Partner - Creator II
Author

I have tested it a lot of times and believe me it is performance killer when you have about 50 kbis with a very complex formulas.

That's why I am looking for a better solution.

tresesco
MVP
MVP

I agree, and that is very obvious specially when you have complex expressions with aggr() and so.. Hence, it is possibly not something to do with pick(match.. but the expressions themselves. For optimization, you might have to take some calculations into the script.

ivan_will
Partner - Creator II
Partner - Creator II
Author

thanks but I am looking for non-obvious solutions. I have tested the obvious ones already!

ivan_will
Partner - Creator II
Partner - Creator II
Author

Any ideas? ...

ivan_will
Partner - Creator II
Partner - Creator II
Author

Any ideas? ...

ivan_will
Partner - Creator II
Partner - Creator II
Author

? ... is it possible ?

tresesco
MVP
MVP

When I re-read your question, I once stopped at your post subject. Are you thinking of putting the expressions in a field and try to use them in the front-end? If yes, yes that is possible. Could you post a sample qvw with sample data where we may work upon ?

ivan_will
Partner - Creator II
Partner - Creator II
Author

Hi, here is a test app with the current solution.

I as have said before I do not want to use pick function!

Thanks!