Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
The #1 reason QlikView customers adopt Qlik Sense is a desire for a modern BI experience. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Performance optimization of Expression

Hello All,

In my app I am selecting Prescriber using the below expression in a list box and on Map.

This is a trigger condition on a button :

=concat(aggr(if(sum(Volume)>20, only(Prescriber)),Prescriber),'|','')

However, the selection is taking more than a minute if number of prescribers is high(e.g >10000)

Any idea how we can optimize above scenario?

Thanks

Khushboo

6 Replies
Highlighted

Re: Performance optimization of Expression

Is this needed to be aggregated on the front end (in other words does this need to work with selections)? If it doesn't then may be pre-aggregate this in the script and then create a flag for each Precriber and then select the flag field...

Highlighted
Not applicable

Re: Performance optimization of Expression

Hi Sunny,

This needs to be aggregated on the front end.

sum(Volume)>20, is user input field. User may select some other metric or combination of metrics.

Hence,  this cannot be calculated from script side.

Regards

Khushboo

Highlighted
MVP
MVP

Re: Performance optimization of Expression

Try this:

='(' & concat(Distinct {<Prescriber={"=sum(Volume)>20"}>} Prescriber ,'|')  &')'


Edit: corrected a bracket.

Highlighted
MVP & Luminary
MVP & Luminary

Re: Performance optimization of Expression

Hi,

I feel you dont need any trigger.

All you do if add a filter i.e Prescriber  and ask your user to search on that field as =sum(Volume)>20

it will do the relevant selection.


give it a try.


Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".
Highlighted
Not applicable

Re: Performance optimization of Expression

Thanks Trsesco for the solution.

Now in my actual implementation,sum(Volume)>20 is something which the user is selecting on the fly.


This is coming from a var: vExp


='(' & concat(Distinct {<Prescriber={"=vExp"}>} Prescriber ,'|')  &')'


When i try this prescribers are coming as blank.


Am i doing anything wrong in above expression. Is there anyway to correct the same.







Highlighted
MVP
MVP

Re: Performance optimization of Expression

Try with $ expansion like:

='(' & concat(Distinct {<Prescriber={"=$(vExp)"}>} Prescriber ,'|')  &')'