Friday, 8 May 2015

Poacher turned gamekeeper

Today is a day of mixed feelings. I am excited because on Monday I will start a new career away from consulting. I am also sad because I am leaving behind a company that I have worked for since 1999 - over 16 years!

The last 16 years have been quite a rollercoaster and I have met, worked with, and drank with, some really great people. I have interacted online with so many other nice people who I have yet to have had the pleasure of meeting face-to-face. I have got to travel far and wide - from Seattle to Seoul - and I have attended some great events - from the old SalesLogix partner events in the early days to the Qlik Qonnections events in more recent years.

I need to give special thanks to all my colleagues at Capventis over the years. All of them have helped me grow by challenging me to be the best that I could. It has been my pleasure to have worked with an incredible bunch of smart people.

I am leaving a much bigger and stronger organisation than the one that I joined so many years ago. I know that they will continue to grow and continue to succeed into the future.


Stephen Redmond is author of Mastering QlikView, QlikView Server and Publisher and the QlikView for Developer's Cookbook
Follow me on Twitter   LinkedIn

Thursday, 30 April 2015

Data Preparation for Qlik Sense

Today, Capventis have made my latest book, Data Preparation for Qlik Sense Desktop using Pentaho Kettle, available for free download:


So, what is data preparation and why does anyone need it?

For those of us that have some expertise in QlikView and Qlik Sense development, we probably don't need to worry about this at all. This is because we already do our data preparation using the Qlik script. All of the data loading, joining, mapping that we do is all data preparation. A lot of us are really very good at using the script to manipulate data to meet the needs of business users.

There are, however, many potential users of QlikView and Qlik Sense who are not adept at scripting. To even tell them that they need to use script to load data will make them turn and run! But they are certainly happy to drag and drop files from one place to another and can handle setting properties in dialog.

For that population, the new feature in Qlik Sense Desktop of being able to drag desktop data-sources into an application makes it really easy to create the self-service analyses that they need to create. But that feature - even with announced changes to the data loader in Qlik Sense 2.0 - cannot really handle more complex loading and transformations, we need to start thinking of the script again.

That is where graphical data preparation tools come in. They enable business users to perform those more complex load and transforms in a graphical environment without having to learn any scripting. They can output a single file that can be dropped into a Qlik Sense app.

There are several Data Preparation tools on the market that have working plugins to extract data into QVX format that can be read into QlikView or Qlik Sense. Leading tools such as Lavastorm and Alteryx will also have server based options and integrations to advanced analytics engines like R.

I went for Pentaho Data Integration (PDI/Kettle) for this project because it is open source and the Community Edition is free - just like Qlik Sense Desktop. Once you have some experience with one, it makes it easier to transition to another. PDI doesn't have an out-of-box output to QVX, but output to Excel is usually good enough for most business users. For the more technical amongst you, there is Ralf Becher's excellent solution to stream data from Pentaho Kettle into QlikView via JDBC.

The eBook is about 80 pages and comes with support files to help you try out the exercises. Feel free to download it now.


Stephen Redmond is author of Mastering QlikView, QlikView Server and Publisher and the QlikView for Developer's Cookbook
He is CTO of CapricornVentis a Qlik Elite Partner.
Follow me on Twitter   LinkedIn

Thursday, 16 April 2015

Explaining Pie-Gauges

Back in December 2013, I discussed different KPI approaches and introduced the Pie-Gauge as a form of representation. I used them in the dashboard of the winning app in the recent Qlik UK partner competition:


Last month, I described how happy I was that QlikView 11.2 SR10 was released so that we could change the segment color in a Pie chart - making Pie-Gauges look better.

Prior to that, and indeed in my entry to the partner app competition, I had used an extension object for creating Pie-Gauges. This is published on Branch.

So, what, exactly, is a Pie-Gauge anyway? It is a gauge because it is representing a KPI - one value versus a target value. However it solves one issue with gauges in that I don't ever have to worry about the scale. This is especially good when I may have several KPIs. Pie-gauges are all about ratios.

Like all pie charts, it is a part-to-whole comparison. In this case, there are always three segments, two of which are mutually exclusive, making up the whole.

The first segment represents the amount by which we have fallen short of the target. The second segment represents the lower of the target value or the actual value. The third segment represents the amount by which we have exceeded the target.

We can see that the whole is therefore the higher of the target or the actual value. We can also see that the first and third segments cannot exist together - we can't fall short and exceed the target at the same time.

The positioning of the segments is important. The first segment must be to the left of the top of the pie, and the third segment must be to the right - signifying below and above target.

The great thing about these gauges is that they will work no matter by how much we have fallen short or exceeded the target - they are always a part-to-whole comparison. Unlike gauges with fixed axes, they will just work.

The really important thing to grasp is that the actual % above or below target is not important!  It is the representation of the ratio that is important. It is whether we are above or below target, not by how much, that we are representing.

The three values can be very easily calculated using Qlik's RangeMin and RangeMax functions.

The first segment is:

RangeMax(Sum(Actual)-Sum(Target),0)

The second segment is:

RangeMin(Sum(Actual),Sum(Target))

The third segment is:

RangeMax(Sum(Target)-Sum(Actual),0)

In QlikView, we can have these as three separate expressions in a Pie chart. In Qlik Sense, we can only have one expression so I use a ValueList dimension and an expression like this:

If(ValueList(' ', '  ', '   ')=' ',
RangeMax(Sum(Actual)-Sum(Target),0)+0.001,
If(ValueList(' ', '  ', '   ')='  ',
RangeMin(Sum(Actual), Sum(Target))+0.001,
RangeMax(Sum(Target)-Sum(Actual),0)+0.001
))

Note the +0.001 on each - that stops Qlik Sense displaying the "chart contains zeros" message. The spaces in the value list are there just to stop additional text being displayed on the Pie.

The color can then be calculated like this:

If(ValueList(' ', '  ', '   ')=' ',
LightBlue(),
If(ValueList(' ', '  ', '   ')='  ',
RGB(240,240,240), LightGreen()
))

Have fun with Pie-gauges.


Stephen Redmond is author of Mastering QlikView, QlikView Server and Publisher and the QlikView for Developer's Cookbook
He is CTO of CapricornVentis a Qlik Elite Partner.
Follow me on Twitter   LinkedIn

Thursday, 9 April 2015

The vaccine effect

Sparked by Alberto Cairo's tweet sharing a blog on Recreating a famous visualisation, I decided that I would go onto the Project Tycho website and grab the data myself to play with in Qlik Sense.

It was, of course, fairly quick to import an Excel file into Qlik Sense Desktop, adding a CrossTable command to break out the data by State.  First visualization, one that I usually turn to to see what I have, was the bar chart:


By adding a color expression to highlight bars up to 1963, when the measles vaccine was introduced, versus those after 1963, the data jumped out very quickly.

I used the new pivot table in Qlik Sense to recreate the WSJ heatmap, along with similar color rules to those used by Mick Watson:


I also decided to have a look at the geographic spread, both before and after the vaccine:


Vaccines are really amazing. Just to think that just over 50 years ago, people were dying from a disease that, for most of us now just doesn't exist.

Worth thinking about.


Stephen Redmond is author of Mastering QlikView, QlikView Server and Publisher and the QlikView for Developer's Cookbook
He is CTO of CapricornVentis a Qlik Elite Partner.
Follow me on Twitter   LinkedIn

Monday, 30 March 2015

Do your Apps win Michelin Stars? Do they need to?

Back in 2012, at the TED@SXSWi event in Austin, Texas, JP Rangaswami, then Chief Scientist at SalesForce, now Chief Data Officer at Deutsche Bank, challenged us to consider that information is food.  It is an interesting analogy. I especially liked the "Supersize Me" suggestion of having to watch Fox News for 30 days.

So, if information was food - what would you do differently?

If information was food, what kind of data visualization would you like to see?

Would you be happy with the daily stodge? Not too pretty to look at, and you are not 100% sure of where the ingredients come from (and you have only been ill a few times!). Perhaps of the variety sold to the residents of Ankh-Morpork by CMOT Dibbler?

Or would you be looking for the time-consuming, detail-attentive, incredibly beautiful and incredibly expensive, Michelin starred fare?

Or is it somewhere inbetween?

The reality is, boringly, that it doesn't matter how pretty nor how ugly the presentation layer is if the ingredients are suspect. As I said in a post last year, good governance prevents people from getting food poisoning.

The first step is to get the ingredients right (or as right as we possibly can!) - then we can focus on the presentation. And focus we must. A plate of great ingredients just mashed together will not encourage our diners to return. We mush present our ingredients as best we can with the tools that we have available and then the foodies will keep coming back.

You never know, one day there may be a Michelin judge with them.


Stephen Redmond is author of Mastering QlikView, QlikView Server and Publisher and the QlikView for Developer's Cookbook
He is CTO of CapricornVentis a Qlik Elite Partner.
Follow me on Twitter   LinkedIn

Monday, 9 March 2015

Segment color in pie chart

QlikView 11.2 SR10 includes one new feature change:

"Now possible to define color of the lines around the sectors in a Pie chart. In the properties Color tab of the chart, you can now find the Sector outline property. Please note that calculated colors do not work for this setting."

I know what you are thinking - "Yay!  Sector outline!"

Ok, ok, I know it is not the most fabulous thing to happen to QlikView since it was created, but it does help me with one area: Pie-Gauges.

When I first proposed the Pie-Gauge, it was difficult to get it looking really nice with the native Pie control:


For me, the black outlines detracted from the visualization.  So much so, that I ended up creating an extension object to do the job!

This new change in SR10 means that I can make one properties change, and the same visualization now looks way better.


We could argue for hours about whether this is more or less effective than the same gauge, but it is nice to see new features like this creep into the product.


Stephen Redmond is author of Mastering QlikView, QlikView Server and Publisher and the QlikView for Developer's Cookbook
He is CTO of CapricornVentis a Qlik Elite Partner.
Follow me on Twitter   LinkedIn

Thursday, 26 February 2015

Qlik Sense FR1 - A little underwhelming?

So, it is finally here.  Qlik Sense v1.1.0, Feature Release 1, is now available for download and I would definitely encourage everyone to think about updating.

So what is new in this release:

-   A pivot table!
-   A new KPI object
-   Updates to the map object
-   A new way to create calendars - declare/derive
-   A whole load of stuff around server management and APIs.

I believe that the best work that has happened is actually the last bullet. Unfortunately this is the least interesting to the vast majority of people who are interested in what Qlik has to offer.

The new pivot table is good. It is nicely done and will work well for users who need it. I have not been a big fan of having a pivot table in a self-service data discovery tool, but you have to serve the market, and the market have been asking for it.

The new KPI object is, I think, fairly limited, but I do like the option to allow click through to other sheets. It would have been good to have seen this option also added to other objects, like the gauge and text.

The map has been updated to include its own tiles so that you don't have to add the custom Slippy map - although that is still available if you want it.  They have also added the facility to snapshot the map for stories. I think that they could have added some other functionality here, but it is still a good solution for most needs.

I was initially very interested in the new Declare / Derive functionality. It allows us to create a template for fields that can be derived from other fields and then apply it to several fields. The demo example is deriving different calendar fields from a date field, which could help replace some of the calendar scripts that we create and reuse in script. However, I was disappointed to see that some functionality that was in the demo script - creation of drilldown and "collection" (cyclic?) groups is not yet released. I was also disappointed to discover that such derived fields do not work in Set Analysis.

Further thinking on the Declare / Derive will be needed because I am struggling to see a use case for them beyond the calendar example. This calendar use case should really be handled for users, especially self-serving business users, within the UI - and maybe that is where this functionality will end up.

There is some good, and some very good, stuff in this new release.  I have to say though, that I am left a little underwhelmed.


Stephen Redmond is author of Mastering QlikView, QlikView Server and Publisher and the QlikView for Developer's Cookbook
He is CTO of CapricornVentis a Qlik Elite Partner.
Follow me on Twitter   LinkedIn