Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
phiilip
Contributor II
Contributor II

Need help translating frontend script to the data load script

The frontend script is as follows:

SUM(AGGR(((AVG(MeasureA * MeasureB) * SUM(MeasureC)) / MeasureB) * SUM(MeasureE), Dimension1, Dimension2))

I'm still pretty new to Qlik so I can't wrap my head around how I'm supposed to write this in the data load editor. I've tried so much yet nothing works...

Labels (1)
2 Replies
Helga_W
Employee
Employee

Without knowing your data model and the definition of your measures it's hard to say whether the calculation of this formula can be done in the data model or not.

I assume that you are asking this question because the above formula is not very performant.

Using aggr function in chart expressions can be slow if the amount of data is huge.

In general to optimize UI performance, it's a good idea to pre-calculate as much as possible in the data load script. However if the fields that are underlying your dimensions and measures are spread over multiple tables in the data model, then it's likely that the formula cannot be calculated in the data model. Or only if you de-normalize your data model and/or do aggregations in the load script. 

PrashantSangle

does all this fields are coming from one table? If not, then combine all table and make it in one table.

If yes, then try

Load Dimension1, Dimension2, 

((AVG(MeasureA * MeasureB) * SUM(MeasureC)) / MeasureB) * SUM(MeasureE)

Resident TableName

Group By Dimension1, Dimension2;

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂