Qlik Community

Qlik Design Blog

All about product and Qlik solutions: scripting, data modeling, visual design, extensions, best practices, etc.

Employee
Employee

Creating a KPI object in QlikView

We all can agree on the fact that not all the data contained in an app is equally important, right? The most important data should be highly visible and be located in a prime location within your app. Is always interesting to recheck Michael Anthony’s post about hierarchy.

KPIs are one of those elements that for sure will be at the very top of your app's first sheet, it's something you don’t want anyone to miss.

Since we don’t have a KPI object in QlikView’s objects library, all of us have came up with different solutions and tricks to represent a value and some contextual information next to it. All of them have one common aspect, they require several text objects to look good. This is usually ok, is not that hard to achieve a nice looking KPI using multiple text objects, but it can be really tedious to maintain.

The object below shows an example of a KPI representing net sales, it also contains other key contextual information such as comparison vs previous year and comparison vs target. The KPI also includes graphical indicators that will let us know if the measured indicator is performing good or bad based on our goals.

pic1.jpg

It looks really neat but in order to achieve something like that in QlikView you will need to create and maintain a good amount of text objects as you can see.

Today we introduce yet another alternative to text objects, it's a really smart, sexy looking, and easy-to-manage KPI object. And it’s all done using only one object! Let’s see how it’s done.


pic3.png


Each one of those three KPI objects are in fact a gauge chart heavily tweaked to look like a completely new KPI object. To do so you need to remove the gauge image in the gauge chart and add some text boxes as “Text in Chart”. Good news is, it all belongs to the same object now so you will be able to move it around without missing any part.


My very favorite piece of this method is the flexibility obtained by using variables to modify each one of the moving parts that form the object making it a piece of cake to maintain. Next, I’m including a diagram of the object so you can get a better understanding of it.


pic2.jpg

PROS:

  • Simplified administration.
  • Global configuration options = unified look&feel.
  • Manageability, no more loose parts when moving/copying objects across sheets.
  • Minor tweaks to replicate across projects.

CONS:

  • It might be a bit confusing for newbies due the intensive use of variables.


I’m attaching an app (qvw) so you can just copy and paste it to your new project and explore how it's done.


Enjoy it!

AMZ


PS: All kudos must go to Rasmus Andersson and Alexander Mosquera alexmosq at Mindcamp and Fredrik Thomsen and Peter Wedebrant @Qlik.


36 Comments
kristof_j
Contributor II

Lovely! And you can use actions also.

No more text boxes

0 Likes
3,256 Views
Siva_Sankar
Honored Contributor

Nice info

0 Likes
3,256 Views
Marcio_Campestrini
Valued Contributor

Great solution!

Now it's easy to create KPI objetcs.

Thanks all folks!!!

0 Likes
3,256 Views
ecolomer
Honored Contributor II

Very nice

Good work

Thank's for sharing

0 Likes
3,256 Views
Partner
Partner

Arturo like always, very useful!

Thanks

Fernando K.

0 Likes
3,256 Views
jsakalis
New Contributor III

Looks great. Thanks so much for sharing!

0 Likes
3,256 Views
Partner
Partner

Very Nice. Thanks for sharing

0 Likes
3,256 Views
neelamsaroha157
Valued Contributor II

Thanks for sharing....This can save lot of time

0 Likes
3,256 Views
Partner
Partner

Nicely done. Thanks for sharing.

0 Likes
3,256 Views
Not applicable

Arn't they nice. Would be even more nice if Fredrik and Peter would have been kind to credit my dear colleagues Rasmus and Alexander at Mindcamp who were the actual guys behind this clever solution, in a project we did at a client, where our good friends at Qlik later received a copy of our app for demo purpose.

Anyway, it's a neat solution and it's fun to see it get some spread! But you might want to aim the kudos the right direction.

3,256 Views
satishkurra
Valued Contributor II

Good one.

I believe text objects is the best way to display KPI's against Gauge charts and additionally text object is a light object and calculation time is also very less...

0 Likes
3,256 Views
Partner
Partner

simple, nice and useful!

0 Likes
3,256 Views
Partner
Partner

Quite nice, thank you!

0 Likes
3,256 Views
Employee
Employee

Thanks for the update Anders, please apologize to both of your colleagues for not mentioning them at first hand.

0 Likes
3,256 Views
Partner
Partner

Thanks a lot for putting this together . very helpful.

0 Likes
3,256 Views
tracysmart1969
Contributor

This is really neat.

Thanks for sharing

0 Likes
3,256 Views
migueldelval
Valued Contributor

Nice and very useful!

Thanks for Sharing

0 Likes
3,256 Views
gilbertomedeiro
New Contributor III

Congratulations Arturo!!

That's really nice and very useful!

Thanks for sharing!

0 Likes
3,256 Views
Not applicable

Very helpful, thank you.

0 Likes
3,256 Views
arkossa-jpl
New Contributor II

Thanks a lot!

0 Likes
3,256 Views
adamdavi3s
Honored Contributor

Superb

0 Likes
3,256 Views
Partner
Partner

Very useful, thank you

0 Likes
3,256 Views
Not applicable

very Useful Information.Thanks For Sharing.

For learning QlikView, Visit QlikView Training In Hyderabad

0 Likes
3,256 Views
Not applicable

Is there any tutorial for Personal Edition Users? Because I can't use the .qvw file.

Thanks!

0 Likes
3,256 Views
Not applicable

Very good.

0 Likes
3,256 Views
ankurakash
New Contributor III

Great piece of art and superb explanation. Thank you Arturo. I used this technique in one of the existing application and was able to reduce no. of KPI objects which were previously created using text objects. The end result was elegant and cool. Indeed a takeaway for me.

Is there a possibility of putting a horizontal bar which can dynamically vary (red and green indicator) based on other text in chart objects defined under gauge chart!!

Regards,

Ankur Akash

0 Likes
3,256 Views
Not applicable

This is awesome! So I'm relatively new to Qlikview, I was able to get the KPI's working after I loaded my data and set my expressions in the input boxes, but if I reloaded my data the expressions I created for the KPIs would disappear in the input box. Any ideas on why this could be happening?  I was able to set my variables in the load statement like so and that would work after each reload.

let vG.KPI1Diff='=count(CAPSID)';

0 Likes
3,256 Views
dapostolopoylos
Contributor III

Very good solution, thank you very much!

0 Likes
3,256 Views
danielabyt
New Contributor II

Can i to create to Qlik Sense?

0 Likes
3,256 Views
ekelley93
New Contributor III

This looks like a great tool. I am new to Qlikview however and I am not sure how to utilize this once I have it in my script. Also, I am not  sure where to go to have the KPI show up on my dashboard. Is there a tutorial or demonstration of how to utilize this?

Thanks,

Erin

0 Likes
3,256 Views