Archive | May 2014

Set Analysis Vs. IF()

I still see many people using IF() statements inside expressions.
I have decided to make a simple test with unique values going from 1,000 to 10,000,000 records.
I have created two streight tables. One using IF() and the other one using Set Analysis.

In the first table I used this expression: sum(if(Sales >=10, Sales))
The second table had this other expression: sum({< Sales = {“>=10”} >} Sales)

I then took notes of the calculation time and the memory used. See the charts below showing the results.

Calculation Time

Calculation Time

Read More…


Attribute expression types

Today I’d like talk about attribute types in expressions.
As you might now, expressions can be used pretty much in any object in Qlikview but not all of them support attributes.

Attribute expressions allow us to dynamically format expression data.

If we want to work with attribute expressions, we need to create a chart (e.g bar chart). We then go to the Expression tab, create an expression and click on the + symbol next to it.


Picture 1 – Attribute Expression

We will find 7 different attribute expressions:

  • Background Color: defines an attribute expression for calculating the basic plot color of the data point. The expression used should return a valid color representation.
  • Text color: calculates the text color of text associated with the data point.
  • Text Format: calculates the font style for text associated with the data point. The expression used as text format expression should return a string containing a ‘<B>’ for bold text, ‘<I>’ for italic and ‘<U>’ for underlined text.
  • Pie Popout: only for pie charts. Calculates whether the pie slice associated with the data point should be drawn in an extracted popout position.
  • Bar Offset: only for bar charts. Calculates an offset for the bar or bar segment accordingly.
  • Line Style: only for combo and radar charts. Calculates the line style for the line or line segment associated with the data point. The relative width of the line can be control by including a tab ‘<Wn>’ where n is a multiplying factor to be applied on the default line width of the chart. The number n must be between 0.5 and 8. The style of the line can be controlled by including a tab ‘<Sn>’ where n is an integer between 1 and 4 indicating the style to be used (1 = Continuous, 2 = dashed, 3 = dotted, 4 = dashed/dotted).
  • Show Value: only for bar, line and combo charts. Calculatesif the data point plot should be complemented with a number on data point value.

Here are some practical examples:

Background Color

Picture 2 – Background Color

Bar Offset

Picture 3 – Bar Offset

Pie Popout

Picture 4 – Pie Popout

Line Style

Picture 5 – Line Style

Text Format

Picture 6 – Text Format



Chord diagram extension object.

Chord diagram extension object

We all love Qlikview but we know that it doesn’t provide a great selection of charts.

This is why we might need to create extension objects.

We were asked to make a very specific analysis for a client and none of the charts in Qlikview were suitable for this situation. That’s why we made some research in D3 and found the Chord chart that perfectly fitted our purpose.

We needed to analyse mobile phone users and browsers used on desktop. This is, What browser in desktop do iPhone, Samsung, etc users use? We were not very interested in the number of people but we wanted to provide the client with an easy way of visualizing this data and quickly understand the volume or ratio.

Basically, a chord diagram arranges its nodes radially, drawing thick curves between nodes. The thickness of the curve encodes the frequency of rides between two neighborhoods.

This is what a chord chart looks like: Read More…