Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

marksmunich
Contributor 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

Re: moving Expressions from frontend into scrpting layer(Datamodel)

please post sample app

regards

Marco

MVP & Luminary
MVP & Luminary

Re: moving Expressions from frontend into scrpting layer(Datamodel)

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
Contributor III

Re: moving Expressions from frontend into scrpting layer(Datamodel)

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.

MVP & Luminary
MVP & Luminary

Re: moving Expressions from frontend into scrpting layer(Datamodel)

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
Contributor III

Re: moving Expressions from frontend into scrpting layer(Datamodel)

Thanks a lot Marcus for your inputs and quick response.

Marks