Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
swuehl
MVP
MVP

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.

View solution in original post

4 Replies
swuehl
MVP
MVP

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.

swuehl
MVP
MVP

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.

Anonymous
Not applicable
Author

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

swuehl
MVP
MVP

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.