3 Variations on the QlikView Linear Gauge

QlikView Linear Gauge Featured Image - Nuclear Stacks

When running a nuclear plant, working gauges are an important consideration.

Here we will show you 3 variations of the QlikView minichart gauge. In QlikView, linear gauges are not as straightforward to develop as a similar bar chart would be. They require a little more work, but are definitely worth the effort.

One of the most powerful visuals for BI analytics, in my opinion, is simply the addition of a relative linear gauge next to a column of values. Generally, decision makers need the numbers. But I find that a linear gauge representing and set right next to those numbers gives the user the best of both worlds. They get the definitive numbers along with a visual that brings an automatic sense of relative scale. Linear gauges are also very space-efficient in QlikView when compared with a horizontal bar chart or a pie chart.

For all the gauges we will illustrate, first create a straight table with a dimension and your numeric expression. Then copy it and paste it to make a second expression. Select No Totals for the second expression and select Gauge Settings to configure the look of the gauge further.

 

1. Max Value as Gauge Max

This is my typical “Go To” gauge within a straight table. The defining characteristic of this version is that the maximum value within the list determines the maximum width of the bar column for all the values. It has the advantage of looking clean and best utilizes the width of the column.

The key to this visual is in the Gauge Settings Max window. We must define the maximum of the gauge to correspond to the highest number in the chart.

[qlikview type=”exp”]top(max(aggr(sum(Value),User)))[/qlikview]

The sum(Value) part of the expression is just a copy of the main expression. The aggregation dimension will always be the dimension you are using in your chart. Here are the other settings:

QlikView Linear Gauge - Method One

The finished chart:

QlikView Linear Gauge - Method One - Finished QlikView Minichart

 

2. Share of Total Needle & Segments

If you need to add targets to your numbers that add context, this is the way to go. The advantage here is the ability to add as many colored segments as needed to represent the targets.

Because the values will be adding up to 100% in this case, I chose to select the Relative box on the expressions page for both of my expressions before moving to the Gauge Settings page. You will want to create as many segments as required to illustrate your targets. I usually uncheck Autowidth Segments and define the Lower Bound of each segment manually per requirements. Here are the remaining settings. Note that you should define a different color for each segment:

QlikView Linear Gauge - Method Two Settings

And the finished chart:

QlikView Linear Gauge - Method Two Finished Chart

 

3. Share of Total 2 Color

This version is sort of a combination of the two above. The level of the chart is visualized by the change in color of the bar. This example shows this in relation to the total. The difficult part of this chart was figuring out how to get the two colors to work dynamically to correspond to the gauge value. Typically color segments are static through all values in the chart.

First, we will choose the Relative option in the expressions tab for both expressions. Then go to the Gauge Settings and make the required adjustments:

QlikView Linear Gauge - Method Three Settings

That will give you something that looks similar to the first chart, a colored line that ends and then white space. So how do we get the remainder of the line to fill in with an alternative color?

Get out of the chart properties and go to View à Design Grid in your QlikView menu. This will enable a new option when you right click on the expression column of your chart: Custom Format Cell. In this screen, select the Background Color you require for the right side of the chart. This allows to use two colors and have the point at which the colors change be dynamic for each of the values.

QlikView Linear Gauge - Method Three Custom Settings

Here is the finished linear gauge:

QlikView Linear Gauge - Method Three Finished Chart

QlikView Linear Gauges – Final Thoughts

When creating these QlikView minichart gauges, my Go To method is the first one, a simple linear gauge that relatively echoes the text number. But maybe the other two variations will spark your imagination to explore some other options that might work for you and your clients.

You might also head over to another great article on the use of minicharts in QlikView.

I appreciate any comments below if you have feedback or questions or other variations perhaps.

5 comments… add one
  • Reply Arun Mishra December 1, 2014, 7:36 pm

    Hi Aaron,

    Is it possible to show a count like 10/20 instead of the 50% in the gauge.

  • Reply Jens Riedling March 17, 2015, 11:12 am

    Hi Aaron,
    Nice post. You can even increase the meaning by adding value-depening colour shading to the background of each linear gauge. Works well using the ColorMix1/2 formulas in the Expression background of the chart. The fabs() formula in the chart gives the right length of the gauge while the shaded background lets you distinguish between positive and negative deviations in one gauge column.
    Top positive deviation in green, most negative deviation in red and anything in between shaded from green through white to red.
    Looks nice and easy to understand – and not losing its meaning when applying a different sorting. Been using it for a while, my users’ feedback was good.
    Cheers,
    Jens

    • Reply Terry October 25, 2016, 3:42 am

      Your website has to be the eleroctnic Swiss army knife for this topic.

  • Reply suresh May 9, 2016, 8:15 am

    excellent blog nice expanation .on of the recommandded blogsbr trainings

  • Reply Indiranagar Property June 24, 2016, 5:37 am

    Nice Post…

Leave a Comment

Join us at Living QlikView

Never miss a post.

We Never Spam. NEVER.

Show Buttons
Hide Buttons