Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
Highlighted
ganeshreddy
Contributor III

Move aggregations to script level?

Hi All,

Here I am facing problem with heavy transactional data. Here we planned to reduce the file size/ increase the performance of app by moving potential calculations from UI level to script level. Can anyone suggest/ help me to move the potential aggregations to the script level, basically i am having a trouble to identify/ implement them.

Please find the attached work file for script/ object expression reference.

Best Regards,

Ganesh.

6 Replies
ganeshreddy
Contributor III

Re: Move aggregations to script level?

Hi All,

In the script i need to reduce transactinal records by aggregating with SiteId but record level data is used in joining discount and tender data.

Can anyone suggest an example or provide a sample code to overcome this issue. Here all aggregations can be done in GuestCheaklist table.

Thanks,

Ganesh.

Re: Move aggregations to script level?

Hi Ganesh,

I don't see any complex expression in your Charts/UI Level. Can you point out, which one you need to move to back end?

And Can you provide which table you need to reduce?

Not applicable

Re: Move aggregations to script level?

Firstly, you need to identify fact tables and apply the aggregation on time dimension. For example if you have the fact table transactions on low data granular level (transaction time), then you can aggregate transactions to date , week or month level to reduce the fact rows size. Along the aggregation you can add some flags to enhance the UI expressions.

ganeshreddy
Contributor III

Re: Move aggregations to script level?

Hi Settu,

Thanks for the reply, the complex expressions which are present in Charts are (Unit, Sales, Transactions, Units per transactions, Units per 1000, Avg check), All expressions are being calculated with transaction data from GuestCheckList table. Here the above mentioned expressions need to move to back end, by aggregating at site ID level . So that chat calculation time will be reduced.

Regards,

Ganesh.

ganeshreddy
Contributor III

Re: Move aggregations to script level?

Hi Dathu,

Here my fact table is GuestCheckList table, here the plan is to calculate expressions at granular level (Site ID)

Thanks,

Ganesh

Re: Move aggregations to script level?

Without looking at your data model, you could create a new table from GuestCheckList in your load script.

Use a GROUP BY [Site ID] clause, and in the column list, specify [Site ID], Sum(Sales), avg(Units) etc. to obtain the aggregation results you would like to have.

You may want to increase the details granularity by adding other GROUP BY fields, as in your current setup you will only be able to view aggregated values by [Site ID].

Best,

Peter