Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

farisahamad
Contributor

Calculations within the script itself

Hi,

I am trying to keep all the calculations in my qlik sense report  in the script itself so that i can increase the performance.

But can i directly use the calculation in the scrpt just like in the report without using any join statements if the fields in the expression comes from different physical tables?

1 Solution

Accepted Solutions
MVP
MVP

Re: Calculations within the script itself

No, LOAD statements (where you will use your aggregation functions) are working on a single input table.

There is no logical inference engine during script time, compared to your data model after the LOAD script has finished.

So you would need to use joins / mappings etc. to get all fields needed into the table where you want to calculate the measures.

4 Replies
MVP
MVP

Re: Calculations within the script itself

No, LOAD statements (where you will use your aggregation functions) are working on a single input table.

There is no logical inference engine during script time, compared to your data model after the LOAD script has finished.

So you would need to use joins / mappings etc. to get all fields needed into the table where you want to calculate the measures.

MVP
MVP

Re: Calculations within the script itself

To be more precise, there are few methods to access field values from a different resident table, like

A Look at the Lookup Function

But the performance will be notable worse compared to mapping the field values to the same table, except for very simple settings.

farisahamad
Contributor

Re: Calculations within the script itself

But will it be beneficial when compared to the calculations written within the report?

MVP
MVP

Re: Calculations within the script itself

Sorry for the late answer: What do you mean with beneficial?

If you can put your calculations in the script, without limiting the user in her ability to dynamically explore the data, I would do it in the script.