Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Not applicable

Alternative dimensions in mashups?

Hi all,

The alternative dimensions feature just launched in v2.2 is something regularly requested from users previously used to the feature in Qlikview.

Is there a way to access the alternative dimension from within a mashup? Is there an API method that can be called to switch dimension/measure to the alternative?

Otherwise I'm stuck with my current solution of creating multiple versions of a similar chart and loading each of them into a tabbed HTML box to simulate switching the dimension.


3 Replies
Honored Contributor

Re: Alternative dimensions in mashups?

Hi Mark,

I haven't got an answer to your question on alternative dimensions and measures, but you might want to take a look at the new visualization API. It allows you to create your charts programatically from Javascript, without having to add them to the Sense App first.

You could for example write like this:

app.visualization.create('barchart',                       // we want a barchart

        ["Case Owner Group","=Avg([Case Duration Time])"], // one dimension, one measure

        {"title":"On the fly barchart"})                   // and we set the title

    .then(                                                 // it's asynchronous, so when its ready


            vis.show("QV03");                              // show the chart in a HTML element



The second parameter is simply an array of dimensions and measures, and you could of course create it dynamically if you want to.

There are lots of examples in the documentation.

Hope this helps, and do come back if you have more questions.


Erik Wetterberg

Re: Alternative dimensions in mashups?

If you create a variable and use that as the dimension or measure, then you just need to change the variable with the API.

Not applicable

Re: Alternative dimensions in mashups?

Thanks for the responses. Both viable options.

In our use case though, we want to keep things as simple as possible for the user to be able to build up mashup pages themselves, rather than having a pre-designed fixed set of content.

We are designing a template HTML layout, which they can then populate with different Qliksense objects just by updating the Javascript file to open a new app, and updating the object IDs that populate each div in the HTML..

But for that to be effective we need to keep as much of the design in Qliksense as possible, and with no code so far as possible.

Will think further on those suggestions and what the most practical way to implement is.

Thanks again!

Community Browser