Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
nboccassini
Partner - Creator
Partner - Creator

Concatenate expression from (more) variables

Hi,

I have a problem with my qlikview app.

I need to use 5200 complex expressions store in oracle db. I'm using jontydkpi from this post .
The problem is the length expression in variable (650.000 chars) so I've split in more variable.

Now I've m variables like "pick(N,expr1,expr2.......)" and it works but not together.

var1-> pick(dim,expr1,expr2..exprn)

var2-> pick(dim,expr(n+1),expr(n+2)..exprm)

I need a single expression pick(dim,expr1,expr2..exprn)+pick(dim,expr(n+1),expr(n+2)..exprm) but if I use 

=($(var1))+($(var2))

doesn't works!

1 Solution

Accepted Solutions
nboccassini
Partner - Creator
Partner - Creator
Author

UPDATE:

The workaround:

if(DIM<10,$(var1),$(var2))

works only if the legth of expression in not too long.

View solution in original post

2 Replies
nboccassini
Partner - Creator
Partner - Creator
Author

UPDATE:

The workaround:

if(DIM<10,$(var1),$(var2))

works only if the legth of expression in not too long.

marcus_sommer

It looked like a quite particularly requirement. Therefore it may be useful to optimize the application for this task. This means to shorten the expressions by:

- removing unneeded brackets, spaces, quotes and so on
- replacing conditions with pre-calculated flag-fields
- replacing the comparing of strings against numerical values respectively ID's
- removing of formatting-stuff
- shortening of the fieldnames (at least any qualifying but maybe also the names itself)
- checking for different (shorter) syntaxes
- probably some more similar approaches ...

Beside this you may split those 5200 expressions into logically buckets and the context of the object in which they are used and/or any further selections would reduce their amount.

For some of the above ideas are changes/adjustments within the datamodel needed but it would be generally a good starting point to transfer as much logic as possible to the script.

- Marcus