For a while I have been working together with Ingemar Carlo on some software projects, and last week we made our products publically available in the swedish market. You will find them at Carlobi.se.
The idea behind Carlobi Quick Start is to make it easy to get started with a Qlik environment where they can analyze their own data. In 15 minutes they can get up and running with a Qlik Cloud tenant and their own financial data loaded in a Qlik Sense app.
We do this by using a swedish standard format for export from financial systems. When you sign up for a trial you will get a Qlik Sense tenant with tools for uploading this format, converting it and loading it into a Qlik Sense app, based on a template that’s also included.
While this would work for most, if not all, financial systems in the swedish market, we have made sure it works well with the largest one in the swedish market, Fortnox. We also provide Carlobi Data Extractor, a product that helps you extract data from Fortnox. This allows us to help customers build solutions targeted to their specific needs.
One of the recent new features in Qlik Sense is the ability to add filters to charts, filters that applies only to the chart they are included in, not other charts. So far this is only available n Qlik Sense Clod. (Help is available here)
It has always been possible to filter data in a chart, but setting it up has been more complicated. The new feature makes it much easier and more straightforward, so it is surely a feature that will be welcomed.
Setting it up
To try this I’ll use a copy of the Demo App – Beginner’s tutorial that’s available in QlikSense Cloud If you want to follow along, open it in Qlik Sense Cloud and then make a copy of the sheet ‘ Product details’. Then click on ‘Edit sheet’ in your new sheet.
The filter option is only available in the new authoring mode, so make sure you’r not in the old one (called ‘Advanced options’). I’ll be using the chart ‘Sales and margin by Product Group’ but since that is actually a master object, and you can’t use the new authoring mode on master objects, I’ll firts have to unlink it, to make it no longer a master object. Once that is done, we’re ready to go.
Adding a filter
Filters are based on Qlik set expressions, but do not fear, there is help available to create the expressions. To add filters you use this little area:
First step is to enter the field namn (no, you cannot use dimensions). Do that, either by clicking Add and then searching for the field namn or by dragging and dropping the ‘Region’ field and you get a dialog like this:
Just select one or more regions and we are done:
To verify that it works, end edit mode and make some selections in the region field. Notice how the values in the other charts change, but not the values in our filtered chart, they will still be showing the values in the reion(s) we set in the filter (in my case Nordic). So far so good.
What does the filter affect??
But exactly what does the filter affect? It surely affects the data in the chart itself, but what about other expressions, like dynamic titles etc? Let’s try. Change the title of the chart to (you will probably need Advancd options for this):
=’Sales and Margin by Product Group. Total: ‘ & Sum(Sales)
And now you will have a sum added to your chart title. Switch to analysis mode again, and make some selections in the Region field. Notice that the sum in the title changes, so the filter does not affect the title.
The filter will only affect chart data, not dynamic titles etc. That’s important to be aware of if you are using dynamic titles.
Displaying the filter to users
As you might have noticed Qlik Sense shows the filter at the bottom of the visualization. That works pretty well in this case, but in many Qlik data models you have flags with name that are not so user friendly, or you might have fieldnames with prefixes or more cmplicated filters. If that is the case you can enter your own describing text as a footnote to the chart, like this:
And you will get your own text instead of the default one:
Behind the scenes
If you take a look at the properties of your visualization (I use my own Chrome extension for this) you can find your filters in their own structure:
Using this structure Qlik Sense then generates the actual set expression (qContextSetExpression) that is used:
Much of Qlik’s focus is today on their cloud products. Getting up and running with Qlik Sense Business (the name Qlik uses for their entry-level cloud product) is easy. And even if the hub is different and there is no QMC, it feels familiar. After all it’s the same engine behind the scenes. Many (probably most) extension will also work, since the extension API is the same, and the Capabilities API also the same – almost. But even though the methods are all there, some of them actually don’t give the same result.
The global object in the Capabilities API
The differences I have found are in the global object, as should be expected. (documentation is here). So let’s try it.
The first method is getAppList(). In Qlik Sense Desktop or Qlik Sense Enterprise (which is Qlik’s name on the product you install yourself on a windows server) this method will give you a list of all apps the currently authorized user has access to. In Qlik Sense Business it still works, but if you try it, it looks something like this:
In my Qlik Sense Business hub, I’ve got four apps, but getAppList only returns the one I am currently using. So if your extension uses getAppList to create a list of other apps, it won’t work in Qlik Sense Business.
Another frequently used method in the global object is getAuthenticatedUser(). You use it to find out the users id. In Qlik Sense Desktop you’ll get ‘Personal\\Me’, in Qlik Sense Enterprise you’ll get a string containing UserId and UserDirectory. In qlik Sense Business it looks like this:
So, while the format is the same as in Qlik Sense Enterprise, the content is different. The UserDirectory is empty, and the UserId is actually the IdP subject you can find in the cloud console (IdP stands for Identity Provider).
callRepository
The Capabilities APIs has one method designed to call the repository, originally built to call Qlik Sense Enterprise REST API called callRepository(). It is marked as Deprecated, but it is still there in Qlik Sense Enterprise, and looks like it’s there in Qlik Sense Business too. What happens if we try it?
Qlik Sense Cloud has the REST endpoint /api/v1/items to list apps the user has access to. If we try it, it looks like this:
We do get a warning in the console, but the call works, the data array actually contains the four apps I’ve got in my Qlik Sense Business hub. But since it is deprecated we probably shouldn’t use it but use some standard method of making a REST call instead.