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:
The finished chart:
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:
And the 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:
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.
Here is the finished linear gauge:
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.