1 2 3 Previous Next

Qlik Design Blog

503 posts
Jennell McIntire

Error Variables

Posted by Jennell McIntire Aug 10, 2018

Today I am going to blog about Error Variables and how they can be used in an app.  Error variables are available in Qlik Sense and QlikView to:


  1. Determine what actions should be taken if an error occurs during script execution
  2. Provide information about error(s) that occur during script execution


The four error variables I will review in this blog are:


  1. ErrorMode
  2. ScriptError
  3. ScriptErrorCount
  4. ScriptErrorList


Of the 4 error variables, ErrorMode is the only variable that is set by the user.  This variable determines what should happen if an error occurs during script execution.  This variable is set in the script like this:


ErrorMode can take one of three values: 0, 1 or 2.  By default, ErrorMode is set to 1.  This means that if there is an error during script execution, the script will stop and prompt the user for an action.  When ErrorMode is set to 0, the error will be ignored and the script execution will continue.  When ErrorMode is set to 2, the script will fail and stop.  The ErrorMode variable should be set at the beginning of the script or before a section of the script where you know there may be errors that you would like to handle.  Once the ErrorMode is set, it will remain the same unless the ErrorMode variable is reset/changed later in the script.  For instance, you may opt to set the ErrorMode variable to 0 if there is an area in your script that may throw errors that you would like to ignore (not stop script execution).  In this case, you may need to set ErrorMode back to 1 if you want to be notified of other errors later in the script.


Let’s see how the error messages are presented if I run the simple script below to load a group of Excel files that start with “Book.”  Note, that all the files loaded do not include the “Monthly Sales” field.

Load script.png

If I precede this script with Set ErrorMode = 0, this is what I see when the script is complete.


Notice that the script finished executing even though there was an error.  Now let’s see what happens if we keep the default (ErrorMode = 1) or set ErrorMode = 2.


Here the script execution stopped at the error and did not complete providing the option to Close, correct the script and reload again.


Unlike the ErrorMode variable, the ScriptError, ScriptErrorCount and ScriptErrorList variables are output from Qlik Sense or QlikView that provide information about the error that was encountered when the script was executing.  The ScriptError variable will return an error code.  A list of the error codes and their descriptions can be found here in Qlik Sense Help.  ScriptErrorCount returns the number of statements that caused an error during script execution.  Lastly, the ScriptErrorList variable returns a list of the errors encountered during script execution.  If there is more than one error, they are separated by a line feed.  These error variables can be accessed in the script or via the UI.  In the script, you can simply refer to the ScriptError variable to find its’ value.  For example, in the script below, I can check for the error code 8 (“File not found”) to determine if the file being loaded was missing.


Error variables can also be access in the UI via the Text & image object.  In the Text & image object measure, simply enter an equal sign and the name of the variable like this:


To return something like this:


Error variables are useful and easy to use.  I find ErrorMode = 0 the one I use the most when I know there is a chance that the script may throw an error that is ok to ignore.  It is also useful if you need to control the path of the script’s execution based on an error.  You can learn more about error variables in Qlik Sense Help.




Hey Guys,


Watch this video to learn what's happening at Qlik.


In the video I cover:




Qlik Community Update


Can't see the video? YouTube blocked by your region or organization? Download the attached .mp4 to watch on your computer or mobile device.



Michael Tarallo (@mtarallo)


Recently, Julie Whipple blogged about Qlik’s partnership with Team Rubicon. She talked described how we helped Team Rubicon by creating an amazing mashup which gives the world a view of the awesome job Team Rubicon, it's partners, and countless volunteers are doing around the world. You can find Julie’s blog here: The Value of Data – Team Rubicon and Qlik | Qlik Blog

Even though the data is complex, using Qlik Sense to bring it all together in one view was like a walk in the park, too easy!

Once the data was uploaded into a Qlik Sense app, we setup the entire mashup using the qdt-react-template. We set up the pages and the routes and then used qdt-components to connect to the server and get the KPIs, Charts and Maps. In order to that, all we needed is the config to server https://github.com/qlik-demo-team/qdt-react-template/blob/master/src/components/QdtComponent.jsx and we were ready to go!

We are so thrilled to use our awesome products to make a difference. In general, developing is fun, really fun. When you add in the fact that what we develop is having a positive impact on the world, it makes us proud to be part of such a great company.  

Check out the  Team Rubicon – Open Initiative project: https://teamrubiconusa.org/open/

Here are some helpful links referenced above:

qdt-react-template: https://github.com/qlik-demo-team/qdt-react-template

Examples:  https://webapps.qlik.com/qdt-components/react/index.html#/

qdt-components: https://github.com/qlik-demo-team/qdt-components




2018-08-03 12_53_43-Open Initiative _ Team Rubicon.png

The Picasso.js is an open-source initiative by Qlik. It's a charting library that is designed for building custom, interactive, component-based powerful visualizations.


Until recently, the power of Picasso.js was only reserved for developers. A few weeks ago, our colleague Steven Pressland introduced the beta version of the Picasso Designer Extension, a game changer that takes Picasso.js to the masses making it available for everyone in Qlik Sense.

Picasso Designer for Qlik Sense is an extension to aid building complex charts based on the Picasso.js library without having to write any code or understand the Picasso JSON structure. The extension also provides support for selections against the chart for the expected user experience in Qlik Sense.


Picasso Designer for Qlik Sense.png


For a regular Qlik Sense user, Picasso Designer might be just too much as it comes with an insane amount of options and details, but for those of us who need to customize the charts, the Picasso Designer extension is a great resource and a very interesting step forward.


Check the following video tutorial on what is and how to use Picasso Designer Extension for Qlik Sense:



Alternatively you can watch the video here: Introducing Picasso Designer for Qlik Sense - YouTube




Hope you like it,


Did you know there's a secret developer menu in Qlik Sense? I'm going to let you in on the secret and show you how to access it and what it contains. Just remember, this isn't documented or officially supported, and is subject to change in the future.


To access the developer menu, follow the steps below:


  1. Open a sheet in a Qlik Sense app in your browser
  2. Add /options/developer to the url
  3. Right click on an object and choose "Developer"



You can get the object id, properties, and layout of any object this way. There's also a link to open the object in single configurator, and test exporting. The object id's are useful for embedding visualizations. The properties are useful if you are creating your own objects and want to check the properties of an object in a Qlik Sense app for reference. In my opinion this is the most useful feature of the developer menu. Sometimes if I don't know the correct properties to set to achieve what I want I'll create a similar object in the Qlik Sense client just to check the properties. The layout shows what is returned by the engine for the layout of the object, and can be useful to see what the layout will look like before you actually create an object yourself. And the single configurator link is a handy way to get to the single configurator of an object directly from a sheet.




And now you know about the secret developer menu.

Hey Guys - this particular post may not be relevant to everyone, yet it is an integral part of making sure that a software's capabilities can be used by those who have impairments. With the release of Qlik Sense June 2018, we have added some new accessibility conformance features that comply with WCAG 2.0 standards.  To learn how we are making Qlik Sense more accessible to everyone, please check out this brief video below. Please let us know what you think and post any question, I'll be happy to address them.



Qlik Sense Accessibility




Michael Tarallo (@mtarallo) | Twitter



Can't see the video? YouTube blocked by your region or organization? Download the .mp4 to watch on your computer or mobile device.

Jennell McIntire

Age Function

Posted by Jennell McIntire Jul 13, 2018

In this blog I thought I would share the Age function – a function that is not new to Qlik Sense or QlikView but new to me.  The Age function, which can be used in the script or in a chart expression, returns the age or the number of “completed years” based on a given date (timestamp in the syntax below) and a birthdate (date_of_birth in the syntax below).  The syntax for the Age function is as follows:


age(timestamp, date_of_birth)


Based on the timestamp value, the Age function will return the number of full years that have passed since the date_of_birth.  Let’s look at a few examples.  In the table below, there are 5 players along with their birthdate.  In the last column, I am calculating their age using the Age function.  I am using the Today() function for the first parameter – this will return the current date (7/13/2018) from the system clock.  The second parameter is the birthdate (a field in the data model) for the player.


Notice that the date format for the current date and Birthdate are the same.  The format of dates in an app are based on the Set DateFormat statement at the beginning of the load script unless you opt to format them differently.  In this example, the DateFormat is set as follows:


If I try to calculate the age based on the expression below, it will not work because the first parameter is not formatted properly based on the DateFormat (M/D/YYYY) I am using in the app.  In this case, the Age function will return null.


Age can also be calculated based on a date other than the current date.  For instance, I can calculate age based on an event or the last day of the year.  The Age function is a very simple function to use and can be used in various scenarios other than age to calculate the number of years that have passed since a given date.




I have blogged about qdt-components in the past, on how we can use it with Angular, React, Vue and simple html in the past.


Today I will focus on the Wordpress version.


We can start by searching for the plugin. You can type "Qlik" or "qdt" and you will see it in the results



Once installed, go to the settings and add your server configuration



Then, you can go ahead and create your page/post and add the shortcodes. So far, the only available ones are for KPIs and embedding visualizations.


[qdt-component type="QdtKpi" expr="=Num(Count(distinct operation_id), '###,###')"]
[qdt-component type="QdtViz" id="sNMsjYL" height="400px"]


Here is how it should like at the end



Coming up: All of the features in qdt-components

React template with qdt-components


Github: https://github.com/qlik-demo-team/qdt-wordpress-plugin



If you follow this blog then you know that during the last weeks we’ve been working in our Choose your champion app for the FIFA World Cup tournament happening in Russia.


Our data provider, Gracenote, populates and periodically updates several tables in a SQL database with all the tournament data.


As an example, just assume the Players table looks like this:




Player A


Player B


Player C



The field Actions contain “compressed” information for 8 different actions during a game. The value 145 encapsulates all the information about Player A's performance during a certain game.


Combining multiple values into a single field


It is a frequent practice to combine multiple flag or binary columns into a single decimal column, instead of creating multiple columns to store these indicators.


One of the main advantages of this system versus the alternative of creating a column for each one of the actions is that if later we decide to record a new type of action we can just add it to the Actions column versus having to create a new column for each field.


But, how can I read what Actions column content actually means?


To do so we need more information. We need to know how that column is being created. For example, let’s assume we have this description of Actions column:


Actions Legend

game played = 1

goal scored = 2

penalty scored = 4

penalty missed = 8

1st yellow card = 16

2nd yellow card = 32

red card = 64

assists = 128


The above's data is the key to understand what’s stored in the Action column. To get a better view of it, let's convert the base 10 integer “Value”, to binary as in the expanded representation table below:



Player A (145)

Player B (17)

Player C (139)

Game played (1)




Goal scored (2)




Penalty scored (4)




Penalty missed (8)




1st yellow card (16)




2nd yellow card (32)




Red card (64)




Assist (128)





Binary flags representation:





Player A



Player B



Player C






Player A: played the game, got a yellow card and gave an assist to other player to score a goal.

Player B: played the game and got a yellow.

Player C: played the game, scored a goal, missed a penalty and assisted for a goal.


How to find what we are looking for?


To do so, it’s important to familiarize with the available bitwise or bit operators in Qlik:


Bitnot, bitand, bitor, bitxor , >>, <<


For more examples and further explanation you can check this page: https://en.wikipedia.org/wiki/Bitwise_operation


Continuing with the example, let’s try to find players that have scored a goal.


We need to check if the second bit is set, that means 00000010 (or integer 2 in base 10)




Value bitand 2

Player A



Player B



Player C




From PlayerTable where Value bitand 2 >0;


That statement is selecting from PlayerTable where Value bitand 2 > 0. But, let's go row by row to see what's happening under the hood:

A bitwise AND takes two equal-length binary representations and performs the logical AND operation on each pair of the corresponding bits, by multiplying them. Thus, if both bits in the compared position are 1, the bit in the resulting binary representation is 1 (1 × 1 = 1); otherwise, the result is 0 (1 × 0 = 0 and 0 × 0 = 0)


Player A

        10010001 (145 decimal)

bitand  00000010 (2 decimal)


returns 00000000 (0 decimal)


Player B

        00010001 (17 decimal)

bitand  00000010 (2 decimal)


returns 00000000 (0 decimal)


Player C

        10001011 (139 decimal)

bitand  00000010 (2 decimal)


returns 00000010 (2 decimal)



Find the players who received a “Yellow Card” and did not “Assist”

We need to check if the fifth bit is set,  00010000 (or integer 16 in base 10) and if the eight bit is not set (128 base 10)



Value bitand 16

Value bitand 128

Player A




Player B




Player C





From PlayerTable where Value bitand 16 > 0 and Value bitand 128 = 0;



Bit operators in expressions


Remember you can use the bit operators to create expressions too, so in a object we could do:


=count(distinct {<Value = {"=Value bitand 16 > 0"}>} Player)


This counts how many players have seen a yellow card so far, note how we are comparing the Value with the flag yellow card (16).


As you can see in the examples, the use of the bitand operator has allowed us to compare two different values at a binary level and returns whether the two numbers intersect allowing me to select and/or count the correct numbers.


Hope you find this interesting.

Arturo (@arturoqv)


PS: I'm attaching a QlikView and Qlik Sense app with the example data so you can test it out yourselves.


The biggest tournament in soccer is in full swing today, and if you haven't checked out our Choose Your Champion demo app, take a second to check it out now Choose Your Champion. We've gotten some questions about how we built it, so I'm going to go through a high-level summary. Before we begin, note that there's really two parts of the Choose Your Champion app, the Create a Bracket part, and the Historical Analysis part, which we really took two different approaches for.





Create a Bracket

For the “Create a Bracket” half of the Choose Your Champion app, we connect to a Qlik Sense app with enigma.js on page load. We get all the data we need from Qlik Sense using Qlik expressions and pagination to select from the associated data, which is fast and easy. The data we get from Qlik Sense we then put into a Redux store, and manage state from there. We decided this was the best approach for this part of the app for us for quite a few reasons, but it would be pretty trivial to have Qlik Sense manage all the state here if desired with a few Qlik Sense variables and a bit of set analysis.


Once we have the data from Qlik Sense saved in a Redux store, we just use html, css, and javascript to build the bracket and charts. Any selections the user makes just updates the Redux store. The charts here really are very simple, just some divs with conditional widths/heights. We allow the user to authenticate with Facebook and save their bracket, which we just save to a database, and fallback to localstorage to save the state if the user isn’t authenticated or hasn’t yet saved a bracket.


And this really demonstrates the power and flexibility of Qlik Sense APIs. We can easily get the data we need, and then do whatever we’d like with it.



historical.pngHistorical Analysis

The “Historical Analysis” half of the Choose Your Champion app is probably a more familiar Qlik Sense experience. We connect to the app using our qdt-components library so we have access to our prebuilt QdtSelectionToolbar component and then also built a custom filter and table component (fun fact: the bar chart is also the custom table component, with a few special props). We also connect to the Visualization API using qdt-components to create and embed some native Qlik Sense visualizations.


That’s really it, this part of the app is pretty straightforward.


A few comments

Somebody had asked if the custom visualizations were extensions, and the answer is no, there are no extensions used here. While Qlik Sense extensions are great if you want to reuse them across multiple apps, or enable non-developers to create the objects in the Qlik Sense client, if you don’t have those requirements it’s easier to just build some components that interface with the Qlik Sense engine but don’t have to worry about being extensions. This also means those components can be used in other projects where you may not be connecting to the Visualization API and you won’t have to load all of the assets required to use the Visualization API.


And that’s it. Like I already stated, I think this demo shows the power and flexibility of the Qlik Sense APIs and what is possible with them, and I hope there’s something to take away for everyone here. If you guys have any questions about any of it, let me know.

Michael Tarallo

Using IntervalMatch()

Posted by Michael Tarallo Jun 12, 2018


Hey guys, I was recently at a user group meeting and the topic of IntervalMatch() came up with regards to when and where it was best used. I liked the topic and subject matter that was covered, so I decided to create a quick video showing you how I used it when rating or grading some video game consoles. Note that IntervalMatch() can be used in many situations, however there may be other approaches to achieve similar results. View the Qlik Help topic here.





IntervalMatch is a data load script prefix that creates and links a table used for matching discrete numeric values to one or more numeric intervals where there may not be any specific link or key available between the tables. This is used in situations that utilize interval scales of data such as population, date ranges, temperature, number of units, scoring etc. to name a few.


Let’s imagine I have a number of video game consoles that vary in condition. I want to assign them a rating from good to worst based on a numeric scale related to overall condition and function. I have a grading table that contains the numeric ranges for the grade as follows. Note the Grade field description and the High and Low field range values.


6-12-2018 1-15-24 PM.png


I also have a table that contains my consoles names and their individual rating numeric value.


6-12-2018 1-15-40 PM.png



Since these two tables don’t have a common link between them, when the data is loaded and I select a value from either the console or the grade lists, I cannot see any of the relationships.


6-12-2018 2-17-57 PM.png



I can easily solve this using the IntervalMatch prefix which will look at the data already loaded from the grade table with the numeric intervals and match it to the Rating field in the consoles tables. IntervalMatch must come after the initial data is loaded and before the load statement as shown. (Please note that your interval field order is important, starting with the field containing the lowest interval value first.)


[Grade Ranges]:
FROM [lib://AttachedFiles/console_grades.xlsx]
(ooxml, embedded labels, table is [Grade Ranges]);

[Console Rating]:
FROM [lib://AttachedFiles/console_grades.xlsx]
(ooxml, embedded labels, table is [Console Rating]);

[interval match table]:
Resident [Grade Ranges]


Upon loading the data – you can now see that the tables are now linked with this new interval table. Technically a synthetic key is created but in this situation I am told it is nothing to be concerned about. Now you can clearly see the grade of my consoles by either selecting the Grade or the Console list values or within the table visualization.


6-12-2018 2-22-02 PM.png6-12-2018 2-22-16 PM.png


As always there usually is more than one solution to these types of problems, and perhaps some may be more optimal than others. I’d love to hear from you, so if you have another approach please share it with us.



Mike Tarallo
@mtarallo - Twitter


Can't see the video? YouTube blocked by your region or organization? Download the attached .mp4 to view on your computer or mobile device.

One of the new features in the April 2018 release of Qlik Sense was the addition of the NumericalAbbreviation variable.  This variable allows users to specify the numeric abbreviations that are used when a numeric value has an Auto number format.  This was great because by default, G is used to indicate billions and my preference is to use B.  Now, I can do that by editing the NumericalAbbreviation variable in my script.  If you are familiar with scripting, you know that the first few lines on the Main tab in the script are SET variable statements that indicate what abbreviations and values you would like to use to represent certain data in your app.  For example, in the script below, the MonthNames variable is set to how I would like to abbreviate months in my app.

SET month.png

With the NumericalAbbreviation variable, I can specify how I will like the numeric abbreviation to appear.  By default, it is set like this:

SET default.png

If you created an app using a release prior to the April 2018 release, you will not see this variable on the Main tab in your script but you can add it to your script along with the other variables statements.  The easiest way to do this is to copy and paste it from Qlik Help.


In the app screenshot below, you can see the G used in the Total Gross KPI and in the Top 10 Theaters bar chart (bottom left).


Since my preference is to use the B instead of G to show billions, I changed the NumericalAbbreviation variable to be:

SET - Copy.png

Now the app looks like this:


A small, easy tweak to the script, allowed me to change the numeric abbreviation in the app.  I should note that the numeric abbreviation is used only when Numbering Format is set to Auto.  So, if the Numbering Format is set to something other than Auto such as Money or Number, the NumericAbbreviation variable is not used and the format that you specify in the properties of the object is used.


In this blog, I showed one example of how the NumericalAbbreviation variable can be used but it can also be used to add spacing before the abbreviation or other custom abbreviations, if you choose.  This seems like a small feature but it has a large impact providing users with more flexibility and control over how the data is displayed.  To learn about other new features released in April, check out Michael Tarallo’s Qlik Sense – What’s New April 2018 video.




martin.pngHey guys! I'm pleased to introduce our newest guest presenter in the Qlik Design Blog, Martin Tombs, Global Pre Sales Director at Qlik. Martin has created a video presentation (embedded and attached below) which will help our partners learn how to take advantage of our Qlik Technical Sales Tools - recently announced at Qonnections. I had a chance to view this video in greater detail to prepare the intro and body of this blog - and it is absolutely amazing what the Pre-Sales organization has assembled AND now made available to our partner community!


If you are a Qlik partner, I highly recommenced you invest the 20+ mins to review this presentation and demonstration video. These tools are now being opened up to our partners as a way to facilitate self-sufficiency during the professional phase of the sales cycle.


Qlik Technical Sales Tools can be accessed from the Qlik Partner Portal and currently consists of:


  • Presentation Explorer - Online Qlik application, including 400+ slides & speaker notes, search and build your presentation
  • Technical Insights - Search for answers to questions, samples questions with contextual answers and articles - great for RFPs
  • Sizing Advisor - Online Qlik tool used to deliver hardware recommendations with PDF report generation
  • Qlik Machine Images (QMI) - Automation for demonstration within personal environments of many Qlik product scenarios




Can't see the video? YouTube blocked by your organization or region? Don't fret, download the .mp4 file to watch on your computer or mobile device.


I'd like to thank Martin and the Qlik Pre-Sales organization for sharing this remarkable resource. Please post comments and questions below, we want to hear from you - myself and our team will do our best to respond. Take care all.



Mike Tarallo



I have talked about about qdt-components in the past and how it can be used with Angular, React and in a simple html page.

qdt-components - A Components Library that can be used in simple Html, Angular 5 and React

Today I will show you how to use it with Vue.js.


You can start by the template that we put together https://github.com/qlik-demo-team/qdt-vue-template.


The main component is the QdtComponent.vue https://github.com/qlik-demo-team/qdt-vue-template/blob/master/src/components/QdtComponent.vue


import QdtComponents from 'qdt-components';
const options = {
  config: {
    host: '<yourserver.com>',
    secure: true,
    port: 443,
    prefix: '',
    appId: '133dab5d-8f56-4d40-b3e0-a6b401391bde',
  connections: {
    vizApi: true,
    engineApi: true,
const qdtComponents = new QdtComponents(options.config, options.connections);
export default {
  name: 'QdtComponent',
  props: {
    type: String,
    props: Object,
  mounted() {
    qdtComponents.render(this.type, this.props, this.$el);


Then you can create your pages and start adding your visualizations.


To embed a simple Qlik Sense chart just add this line

<QdtComponent :type="viz2.type" :props="viz2.props"  />

Where viz2 is

const viz2 = {
  type: 'QdtViz',
  props: {
    type: 'barchart', id: 'a5e0f12c-38f5-4da9-8f3f-0e4566b28398', height: '300px',


The full example is at



and you can view it live at



More posts on qdt-components

qdt-components - Horizontal Barchart by Picasso.js & Selection Toolbar

Qdt-components & Picasso.js - More Charts!


This is it


Our David Freriks is back introducing a free, open source utility that provides a visual exploration front end that helps you understand the “big data” that exists inside the Cloudera data lake. It allows a user to visually understand how to create fully interactive Qlik apps on the data of interest to them.


Cloudera Data Lake Explorer is Qlik Associative Engine API based application that leverages metadata from Cloudera (Impala, Navigator, Manager) to browse the width of the data lake and build a self-service Qlik Sens application with no scripting required.  The explorer interface uses the power of the Qlik Associative Engine to show how all the metadata correlates between databases, tables, columns, metadata tags, and sql queries. Watch the video below to learn more.


This application has been published to Qlik Branch (http://branch.qlik.com/#!/project/5afb0d76fefa01686177560d ) and is hosted on Github. The Cloudera Data Explorer is a new take on how to use the power of Qlik to navigate, understand, and leverage big data in a way that simplifies the experience for the exploratory user.




David Freriks (@dlfreriks) | Twitter




David is a Technology Evangelist on the Innovation and Design team at Qlik. He has been working in the "big data" space for over three years, starting with Hadoop and moving onto Spark in this continuously evolving ecosystem. He has 18+ years in the BI space, helping launch new products to market.

Filter Blog

By date:
By tag: