Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I'm trying to make my objects change their dimensions or expressions depending on user selections.
Two options that I'm aware, both working fine and as expected, all examples mentions "dimensions" but is also intended to be used in expressions.
Option 1: Variable
GIVEN a user access a dashboard
WHEN user clicks on Button
THEN Button triggers action assigning variable an Specific dimension, such variable is in Object dimension performing corresponding calculations.
Works great, although I have several Dimensions and expressions forcing me to create N Buttons booming the UI with them. Is there an alternative where I can group or display them in certain way where they do not overload the UI?
Option 2: Fake Fields
I can create N tables with the corresponding values of dimensions / expressions with out any relation with the Data Mart it self. Example Company / Department / People.
GIVEN a user access a dashboard
WHEN user clicks on Filter Pane which contains all values from the Fake unrelated table with data mart and select any value (Company, Department, People)
THEN Object changes it's dimensions value using GetSFieldSelections("Field") from fake field which corresponds really to a Dimension on dataMart.
Also works great, as the UI only has a Filter Pane with the Field values (Department, Company, People and so on) interested by the user which on selection will apply corresponding calculations. The Bummer on doing this is that Qlik cache will constantly re-calculate as per selection of the "Fake" fields which are not related to dataMart wasting one of the best features of Qlik on performance (or at least this is how I think it works). Would be fine if it's the only App in the server and I have memory to butter the roof, which is not the case.
On both approaches, I'm not selecting any field, only changing the dimensions or expressions, as the intention is not to narrow down the information rather change the analysis.
Hope I have explain properly, there's no issue, if i would need to make a summary would be, is there any way to Make similar object on the UI as filter pane but that would work assigning a variable?
Thanks in advance!
I don't think that using dynamic dimensions/expressions are influencing the Qlik caching-logic. The dynamic approach is just a replace of the dimensions/expressions as if you had written them manually and this is evaluated before the object itself is calculated. The calculations happens with the real fields/datamodel, the (fake) fields from the island-table just define which dimensions/expressions are used - therefore I think it's all the same from the caching point of view.
Actually I don't remember of have seeing here any posting which mentioned the opposite and my own experience are giving me no hint that these objects perform more worse/better than others whereby I never measured them directly against normal objects.
With such dynamic approach you make it possible for the user to change their views quite rapidly and therefore they may not query 10 * 10 = 100 different views (different dimensions/expressions * different selections) in an average session else maybe 30 * 20 = 600 and then you will of course need more RAM ... but this in the end not bad because this is the aim from a tool like Qlik.
Whereby you should consider quite well how many dimensions and expressions and in which combination should be possible with which object - more as 10 are seldom useful and not all combinations are meaningful. Two quite granular dimensions in a pivot could easily blow away all available RAM. In this regard you may also consider the use of calculation-restrictions like count(distinct dim1&dim2&dim3) < AnyThresholdValue.
Regarding your mentioned two approaches - with variables vs. field-selections - I would always use the field-selections because IMO they provide a better usability and are easier to implement.
- Marcus