Skip to main content
Jennell_McIntire
Employee
Employee

In Qlik Sense, alternate dimensions and measures are available providing users the option to change the dimensions and/or measures being used in a chart.  Alternate dimensions and measures are defined in advance and provide users with different views of the data all in one chart.  Alternate dimensions and measures can be added to a visualization in the Properties panel.  In the image below, there is a bar chart with Product Sub Group as the dimension and Sales $ as the measure.  There are also two Alternative dimensions: Product Group and Product.  Alternate dimensions and measures can be added by clicking the Add alternative button and selecting or entering the new dimension or measure.

bar chart.png

By default, the bar chart above shows the Sales $ by the main dimension for the chart, Product Sub Group.  Since there are alternative dimensions set up, the user can also view the Sales $ by Product Group or Product by simply clicking the arrow next to the dimension name on the y-axis and selecting either Product Group or Product.

dimension switch.png

In Qlik Sense 3.0, the ability to change the dimension from the axis was added.  Users can also change the dimension or measure by opening the Exploration Menu and changing the dimension or measure.

dimension switch panel.png

Adding alternate measures is just as easy.  In the image below, two alternate measures were added to the Margin Amount Over Time line chart: Sales $ and Budget $.

line chart.png

A few things to be aware of when using alternate dimensions and measures:

 

  • In bar, line and combo charts, the title needs to be visible on the axis of the alternate dimension/measure so the user can see the arrow to click on to change the dimension/measure.  If you prefer not to show the title, then the user can still change the dimension/measure by going into the Exploration Menu.
  • Alternate dimensions and measures can be added to all chart types but they can only be changed in the visualization (via the axis) in bar, line and combo charts.  In other chart, they can be changed in the Exploration Menu.

 

If you are familiar with QlikView, you may find alternate dimensions and measures to be similar to the cyclic group that is available in QlikView.  They are both great features because it allows the user to have one visualization with numerous views.  This is ideal in keeping your sheets uncluttered.  Instead of having the same visualization repeated using different dimensions or measures, you can now have one chart with alternate dimensions and/or measures.

 

Thanks,

Jennell

13 Comments
Anonymous
Not applicable

Quick question,

I have a line chart

I have a 2 dimensions and 1 measure.

Dim1 and Dim2.

There are 3 alternate dimensions assume, AltDim1, AltDim2, AltDim3.

Right now in the Drop down to switch dimensions, the Alternate dimensions appear under both Dim1 and Dim2 drop down.

Is there a wake to force that the Alt Dimensions should be appearing (basically switching) on only one of the 2 actual dimensions.

Best,

Priyash

0 Likes
6,833 Views
JonasValleskog
Partner - Creator
Partner - Creator

SOLUTION: Dynamic referencing of selected Alternate Dimension in expressions, color coding and more.

chrisweldon

stalwar1

sarahplymale

Yes, you can reference the selected Alternate Dimension via the function GetObjectField(<index>) where index = position of your dimension starting at zero.

E.g. Assuming you have two dimensions Group1 and Group2 set up as a main and an alternative dimension you can write expressions such as:

if(GetObjectField(0)='Group1',do something,do something else)

Which means that you can for example custom colour your bar chart with an Alternate Dimension by using the 'Colour by Expression' option and write formula such as:

=pick(match(GetObjectField(0),'Group1','Group2')

, // If Group1 is the active dimension, set the colour to Yellow for all bars where the value of Group1 = 'Bottom'

if(Group1='Bottom',Yellow(),Green())

, // If Group2 is the active dimension, set the colour to lightGray for all bars

lightgray()

)

Limitations:

The GetObjectField function cannot be used in a 'title' field.

Other observations:

The Alternate Dimension feature seems incomplete in its released feature set. Being able to reference key properties, such as the active dimension across an object is pretty fundamental. I can't see an obvious reason why GetObjectField should not be executable from within a title as the title is arguably part of the object, jmc I would definitely pass that one back to Product Development as a recommendation to address in a future release, so that Alternate Dimensions can deliver closer to par with the QlikView Cycle Group feature.


Best regards

Jonas

6,833 Views
prat1507
Specialist
Specialist

HI Jonas

Can we use the getobjectfield of let's say a bar chart where we're using alternate dimension in other charts as well?

Regards

Pratyush

0 Likes
5,746 Views