Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
The project I support has the requirement to provide users with the capability to re-code dimensions. For instance, one dimension in our Qlik Sense app is Field of Study with values like Agriculture, Biology, Chemistry, Computer Sciences, Education, Engineering, and Mathematics. A user may want re-code this dimension so that the value are Education, Engineering, and Other (in this case, Other would consist of a Agriculture, Biology, Chemistry, Computer Sciences, and Mathematics). The data rendered in the visualization could then be filtered on these 3 values. Similarly, another user may want to re-code this dimension as Biology, Chemistry, Computer Sciences, and Other (in this case Other would consist of Agriculture, Education, Engineering, and Mathematics). These re-code definitions would be dynamic and not saved anywhere.
Users access our Qlik Sense apps through a web mashup, so users would need to be able perform the re-coding through the web app using custom code that utilize the Qlik APIs. Does anyone know if this is even possible? I haven't seen anything that references this type of capability.
It's quite possible with a couple of approaches. If you are creating the chart in QS, use a Calculated Dimension like:
=aggr(if(Match(Subject, $(vOtherList)), 'Other', Subject), Subject)
Then your mashup can set the contents of vOtherList using the Variable API. Set it to a comma separated quoted list like:
'Agriculture', 'Biology', 'Chemistry', 'Computer Sciences'
See attached example.
An alternative method might be to use the ApplyPatches() method against the chart hypercube to update the DImension directly.
-Rob
Thanks Rob, i’ll Try out your suggestions