Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ganeshreddy
Creator III
Creator 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
Creator III
Creator III
Author

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.

settu_periasamy
Master III
Master III

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

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
Creator III
Creator III
Author

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
Creator III
Creator III
Author

Hi Dathu,

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

Thanks,

Ganesh

Peter_Cammaert
Partner - Champion III
Partner - Champion III

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