Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
marksmunich
Creator III
Creator III

moving Expressions from frontend into scrpting layer(Datamodel)

Hello Qlik's,

Could some one suggest me the best way to move the complex Forumulas in the frontend Analysis layer to the Scripting layer. For example: if the expression in the diagram uses the Data from 3 or 4 different Tables , What is the best way to write the expression in scripting layer by fetching data from 3-4 tables. I though of bringing the fields/ dimensions which i require in the forumula to one table  by using the mapping tables and read all the values from different tables and then perform the calculation in one table.

Is it the only possible way or is there any other alternative.

Thanks & Regards

Marks

5 Replies
MarcoWedel

please post sample app

regards

Marco

marcus_sommer

Often it brings a performance-benefit within the gui if you transfered (complex) calculations to the script-level. But like always the world isn't black or white - there are many different grey-colors and mostly you need to decide to choose one. This meant you shouldn't try to make each calculation within the script - many calculations are a lot easier within the gui (beside the benefit of being more flexible) but often you could make some pre-calculations to simplify and speed up your expressions, see for example postings like:

On Boolean Fields and Functions

Customized flags

- Marcus

marksmunich
Creator III
Creator III
Author

Hi Marco,

Its a general question. nothing specific to an application. But what is the best method which can be adopted to move the Expressions from layout to the scripting layer. As mentioned data in expression can be from multiple tables.

Thanks

Marks.

marcus_sommer

I think there are too many possibilities for a general answer and there could be several different goals for an optimization from an application. I'm afraid that you will need to be specific each time you want to make such changes. Maybe this is helpful for you: Data Modelling: Clarity vs. Speed.

- Marcus

marksmunich
Creator III
Creator III
Author

Thanks a lot Marcus for your inputs and quick response.

Marks