Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
NOTE: The Qlik Help Channel on YouTube has the latest and greatest how-to's for the latest releases.
Don't forget about the Qlik Online Help as well. It has videos, samples, tutorials and more.
How we can creating a gantt chart in qlik Sense without use any extension .
Ex: we can also create gantt chart in qlik Sense through anychart extension .
iPortal is a web application that allows you to easily impersonate users in a Qlik Sense Enterprise deployment. It is not intended for production environments. iPortal enables you to configure the list of users, groups, and images and login to Qlik Sense using these users. This enables you to demonstrate and test Qlik Sense from the viewpoint of many roles.
Additional security configuration is required to fully enable the Governed Self Service reference deployment. Please refer to the GSS Setup Guide for more information.
For documentation on setting up a local iPortal development environment, click here
***UPDATED 06/30/2021
To resolve rest connector related issues visit:
**UPDATED 10/16/2020
Revised Sense Sample to include updated cookie parsing and proper error handling
Added sample to trigger an NPrinting User Import Task from Qlik Sense
****
One of the most common questions is how can i distribute my NPrinting reports to occur automatically as soon as my Qlik app is done reloading ?
THis is possible in both Qlik Sense and with QlikView using the NPrinting API. Moreover, you can invoke the API through the the Qlik load script Qlik REST Connector v1.3+. What this means is that you can schedule and/or chain your NPrinting report distributions using the Qlik Sense scheduler or the QlikView publisher to better integrate the operations across the platform
.The sample included herein draws on the great document published by gianluca perrin on Qlik Community here: https://community.qlik.com/thread/292037
Benefits
Should the NPrinting task, publisher has a built in solution to notify administrators. Qlik Sense also has 3rd party solutions to do the same.
Restrictions
You need to have v1.3 of the Qlik REST Connector. Its available as of Feb 2018.
Sample
Connection setup
You will need to create two REST Connector connections to the NPrinting API. One that uses a default HTTP method of "GET" , the other will use "POST" as the default method.
Please reference pages 8-9 of the document https://community.qlik.com/thread/292037 to create the two connections.
App Setup
1. Import the attached application and open the script in the Data Load Editor
2. Modify the SETUP tab to reflect your
i. on lines 25/26 update the names of the two REST Connections that you create using the steps in 'Connection Setup' above.
ii. on line 30 , if NPrinting is configured to use https (it is by default) leave this setting to 'Yes' . If you reconfigured it to use http , set to 'No'
iii. On line 31 , set the NPrinting server and endpoint (host + port)
iv: Line 35 is the name of the NPrinting Publish Task that you want to execute
v: Line 37 and 38 is an enhancement to have Qlik check the NPrinting task executions for errors, or , if it runs too long, to abort it and report a failure .
3. (optional) You can also Import the following application into Qlik Sense to send an administrative alert. THis is not necessary with QV Publisher as it has an in-built feature to notify administrators when a publish task fails.
4. Open the imported app in the data load editor and update the 'setup' section
i. on lines 21/22 update the names of the two REST Connections that you create using the steps in 'Connection Setup' above.
ii. on line 26 , if NPrinting is configured to use https (it is by default) leave this setting to 'Yes' . If you reconfigured it to use http , set to 'No'
iii. On line 37 , set the NPrinting server and endpoint (host + port)
iv: Line 32 is the name of the NPrinting Publish Task that will alert an administrator about a report failure
(note that i've toyed with using the Notification Web Connector to send an administrative email alert in the event of a full blown NPrinting outage. This sample is a little simpler)
Task setup
In Qlik Sense QMC under tasks i've setup 3 tasks .
Task #1 - reloads a Qlik App
Task #2 - Distributes reports in an NPrinting Publish task (this is chained to execute 'on success' of Task #1)
Task #3 - Send an Administrator alert (this is chained to execute 'on failure' of Task #2)
QLIKVIEW
The QLikVIew solution has all the same benefits as the Qlik Sense solution with a couple more benefits.
Additional benefits:
- you can pass the vTask name from the publisher task to make for greater re-usability of the load script for chaining multiple tasks
- Publisher has a built in admin notification feature. SHould the NP task fail, the publisher task will also fail and an admin notification will be sent (you can do that with qlik sense but need to use a 3rd party qlik sense task notification solution, or use the load script to call an administrative task to send a notification. The latter can be done with NPrinting or with the Qlik Web Notification Connector.
Load script
The QlikView load script has a login , get task ID (lookup using task name), post task execution, and a task execution check tab. The task execution check tab will monitor the NP task execution on an interval with a configurable timeout. Should the NP task throw a warning or error, it errors out the publisher task. Should the NP task exceed the timeout, it kills the NP task and errors out the publisher task.
You will need to update the NPServer, Task and timeout settings in the CONFIG tab. Again use the REST Connector 1.3 and i suggest testing with QV desktop first . The REST Connector must be manually installed on QV desktop and on the publisher machine to work.
New cookie parsing:
//Set Cookie header
let vCookieRaw = peek( 'Set-Cookie',0,'_response_header');
if vSSL='False' then
let vCookie= subfield(subfield('$(vCookieRaw)','Path=/,',3),';',1);
else
// let vCookie = TextBetween('$(vCookieRaw)','Secure,','Path=/',2);
Let vCookie = TextBetween('$(vCookieRaw)','SameSite=None,','; Path=/',3);
end if
Trouble maintaining your Master Items in Qlik Sense? Look no further, GINQO's Master Item Manager has been further improved. Master Items can be difficult to maintain as you create more of them, which is risky for your development. To solve this issue we have enhanced the GINQO Master Item Manager to help you work even more effectively with Master Items.
An improved UI as well as better error handling and Drill-down support makes this a great option for your development. Additionally all Dimensions/Measures are now tagged by the Extension, making it even easier to maintain and manage them.
Try our Master Item Manager extension (https://github.com/GINQO/Master-Item-Manager). Comments and Feedback are always welcome. Additionally, let us know if you would like to contribute to the open-source community.
What is it?
Why was it built?
Who is it for?
Communication is a key point for any project and failing to do it may compromise your success.
Having this in mind, I dedicated some time to find out a way to display a message on the Qlik Sense HUB and make sure that all users would be able to see that.
Thanks to @j_twardziak and his post Showing support message on top of the Qlik Sense Hub page, my target was accomplished.
However, when I implemented my version, I realized that the header message was not being displayed on the HUB unless CTRL + F5 was pressed (a normal behavior for web). Then, how do you communicate with your users if they didn't receive the message?
In the document attached, I shared step by step how to implement a header message (my version) on the Qlik Sense HUB and what needs to be changed in order to force the client-side to be updated. Before doing any changes, ALWAYS make a backup of the files.
Here is how it looks like.
Although I didn't have implemented @berndjaegle 's suggestion, he explains how to add an URL to the header message in the original post.
Qlik Sense environment
IMPORTANT: Keep in mind that the changes shared here are not supported by Qlik.
Best regards,
Huberto Pereira Haidemann
Hi all,
Mini Charts have always been a good feature in QlikView and It's really 'frustrating' that this has not been added (yet) in Qlik Sense.
With hopes that the Qlik Team will think about such improvements for the next releases, let's discuss here how to create our own mini chart in a Qlik Sense Table.
The following expressions might seem 'complicated' at first sight, but remember that It will be generic.
You'll only have to change your : Dimension(s) and Measure to adapt to your need.
Thus, their use will be very easy.
Let's begin :
Suppose we have:
As a dimension: OICA Region
As measures:
Sum(Sales)
Sum("Commercial Vehicle Sales")
Sum(Sales) / (Sum(Sales)+Sum("Commercial Vehicle Sales"))
Here is our current table:
Now, we want to add, a mini 'bar' to represent the %:
How to do so:
As an expression:
=repeat('█',
rangemax(rangemin( ceil(((column(1)/column(2))-1)*2.5),10),0)
)
With that, we repeat the square sign and precise the limits.
And as a text Color expression:
if( (sum([Car sales])/(sum([Car sales])+sum([Commercial vehicle sales])))>=0.8,Green(),
if((sum([Car sales])/(sum([Car sales])+sum([Commercial vehicle sales])))>=0.7,Yellow(),
Red()))
Result:
We can also Add the % in front of the bar by adding it in the expression:
From :
=repeat('█',
rangemax(rangemin( ceil(((column(1)/column(2))-1)*2.5),10),0)
)
To:
=repeat('█',
rangemax(rangemin( ceil(((column(1)/column(2))-1)*2.5),10),0)
) & num((sum([Car sales])/(sum([Car sales])+sum([Commercial vehicle sales]))),'# ##0,00%')
Result:
You can even alter it as follow:
repeat(chr(09608),round( sum([Car sales])/(sum([Car sales])+sum([Commercial vehicle sales])) * 10))
&repeat(chr(09617),10-round( sum([Car sales])/(sum([Car sales])+sum([Commercial vehicle sales])) *10))
&num((sum([Car sales])/(sum([Car sales])+sum([Commercial vehicle sales]))),'# ##0,00%')
&if(sum([Car sales])/(sum([Car sales])+sum([Commercial vehicle sales]))>0.7,'▲','▼')
result:
Now, let's suppose we want to add another mini chart, a trend one, to see the % expression by Year:
If it has increased or decreased from a year to the next one.
How to do so?
Expression:
=concat(
aggr(
if((sum([Car sales])/(sum([Car sales])+sum([Commercial vehicle sales]))) > above((sum([Car sales])/(sum([Car sales])+sum([Commercial vehicle sales])))),
'▀',if((sum([Car sales])/(sum([Car sales])+sum([Commercial vehicle sales]))) < above((sum([Car sales])/(sum([Car sales])+sum([Commercial vehicle sales])))),'▄',' ')
)
,[OICA region], (Year,(NUMERIC, ASCENDING))
)
,'',[OICA region])
Wirh:
Red: Our Dimension
Green: The trending dimension
Blue: our expression compared to the previous one (by year, the trending expression)
If expression by Year > expression Previous Year then , Square Up
If expression by Year < expression Previous Year then , Square down
Result:
Special thanks to blog Von Heldendaten in which I found this:
QlikView + Qlik Sense Blog von Heldendaten: Qlik Sense Calendar Measures & "Minicharts" in Tabellen.
Hope you like it !
Omar,
I stumbled upon this feature while trying desperately to simply get a list of items displayed in the QMC exported into an Excel spreadsheet. If there are other simpler methods, please let me know.
The tip requires OneNote and Excel and Internet Explorer (Other browsers not tested)
If you have any questions let me know.
Shaun
Hi community,
I assume we all, once in a while, faced this question : "Is it possible to store a table from QlikSense into our database?"
Since QlikSense is not made to write into a database but rather select from it, the idea is to create a procedure/function within the sql database, that will populate the table when called from the Qlik Sense script.
So, without further due, the answer is : YES !
I'll now share with you how I did to implement this:
1) The database should allow the creation of Procedures/functions.
For this example, I will be using postgresql.
a) create the table :
The first step is to create the table within the sql database :
example:
CREATE TABLE alerts
(
alertname character varying(100) ,
desk character varying(100)
)
b) create the Function:
The function writeback will be responsible of populating the table alerts:
CREATE OR REPLACE FUNCTION writeback(
alertname character varying,
desk character varying)
BEGIN
INSERT INTO alerts VALUES (alertname,desk);
END;
c) Connect to the postgresql database and call the function:
Now, in the Qlik Sense script; what we want to do is store the table QlikSenseAlerts into the table alerts created within the Postgres db
QlikSenseAlerts:
// 1) the idea is to add rowNo() field to go through all the lines of our QlikSenseAlerts table
alerts:
load *,RowNo() as row inline [
Alert , Desk
alert1, desk1
alert2 ,desk1
alert3 , desk2
alert4, desk4
alert5, desk5
alert6, desk6
alert7, desk7
alert8, desk8
alert9, desk9
alert10, desk10
alert11, desk11
alert12, desk12
alert13, desk13
alert14, desk14
alert15, desk15
alert16, desk16
alert17, desk17
alert18, desk18
alert19,desk19
alert20,desk20
];
//2) connect to our database
LIB CONNECT TO 'PostgreSQL_localhost';
//3) line by line, store the value of each column in a variable
for a=0 to FieldValueCount('row')-1
Let vAlert = Peek('Alert',$(a), 'alerts');
Let vDesk = Peek('Desk',$(a),'alerts');
//4) call the function writeback that will store our 2 variables into the sql table; each variable contain the columns'value of the 1st row
SELECT public.writeback('$(vAlert)','$(vDesk)');
//5) do the same thing for all the lines
next a;
Result:
Table alerts in the sql table before reloading qlik sense script:
We, run the script:
Table alerts in the sql table after reloading qlik sense script:
Hope you'll like it
Omar BEN SALEM.
Update, the example app now have the drawing as a background.
Floor plans and cad drawings can be useful, for instance in production dashboards, to visualize status and flows in a factory. However cad drawings are in many cases a mess to work with.
Here's a simple, pragmatic approach to digitize rather than import the actual drawing. The major issue with most CAD drawings is lack of structure, details without meaning and the objects on the right level are missing. It’s not the format or alignment that is the problem. In many cases it's better to use the drawing as a input to produce the polygons and information needed.
In this tutorial I use QGIS for digitizing and out put to a format that is easy to import to QGA. In this example the drawing is digitized in a local reference system, ie no alignment is made with the rest of the world.
Step-by-step guide
Example app
The example app features sites and a drawing visible when one site is selected.
If you want to add and image background, here's how to scale and translate the image, in my example:
Tip 1: get a white background use ='[[ [-180, -80], [-180, 80], [ 180, 80], [ 180, -80], [-180, -80] ]]' for location, set color to white and make the layer non selectable and not part of autozoom.
Tip 2, Use a bubble layer with coordinates for different sites, when one site is selected turn on drawing and the white background.
Using Excel variables in Qlik Sense
Approach : Use excel sheet for loading all set analysis in Qlik Sense environment and use those variables as a expression in Qlik Sense Charts.
Simple approach to load all set analysis expressions using excel sheet and maintain at one place and use the same for expressions in Qlik Sense Charts.
Find attached excel sheet containing YTD, Current YTD, Growth % formulas in excel sheet same has been loaded in QS & used in Chart as a variable.
Monitoring current performance and availability of Qlik Sense site is not out-of-the-box feature, but can be easily achieved with native REST connector and requesting engine\healthcheck JSON API.
There are other tools and approaches, but since I already have the best BI tool available 😉, I found it reasonable to use it. All that is necessary is just:
This Qlik Sense app:
It's recommended to deploy and schedule this app on DEV or TEST site, pointing to all production nodes. Otherwise, there will be no data loaded in case the production engine (or the whole server) crashes.
(just FYI - DEV and TEST sites are included in the professional license subscription)
It's also recommended to read the official help site info about the engine API before you deploy this app.
After importing the app to a suitable site, follow these steps:
1. Decide on target folder for result QVD files, where parsed snapshot of JSON data will be stored. Create a folder Data Connection (if it doesn’t already exist) and set its Lib name to vQVDpath variable in Settings script section.
2. Create a REST Data Connection to each node:
URL: https://<server domain>/engine/healthcheck OR https://<node IP address>:4747/engine/healthcheck
Authentication Schema: Windows NTLM
User name & password: type root admin or service user credentials
check "Skip server certificate validation" if there is no valid certificate on target node
Query headers:
User-Agent: Windows
Cache-Control: no-cache
3. Adjust the INLINE table in the Settings section of the script according to your site
node - name of the node that will be shown for app’s user
restConnection - name of the REST connection that points to node’s engine/healthcheck
RAM - amount of node's memory in GB
CPU - number of node's logical processors
4. Schedule a reload task. The recommended app reload frequency is 5 minutes or less (tested reload duration on the 4-node site is 12 seconds). The script will return "N/A" in [isSaturated] field when the engine is not responding.
The current roadmap includes - script for email notifications, possibility to load only N days back, mapping app name to IDs, node comparisons.
PLEASE! If you make adjustments or additions to the script or front-end visualizations, please share them back on the Qlik Community.
Happy Qliking 🙂
-RADO-
This post explains how to connect to an Oracle database using the OLE DB connector and a tnsnames.ora file.
Examples for QlikView with Qlik GeoAnalytics.
Binning
This app shows an example of how the Binning feature can be used to create rectangular or hexagonal bins over Sweden. It also shows a drill-down hierarchy with two levels of rectangular bins and a point level.
Chart Layer example
An example of how the Chart Layer can be used to plot data points on graphs (both bars and pies) using two dimensions. This example shows how the average house prices in Sweden have developed over time.
Polylines and Symbols example
An example showing how to use the Line Layer to create Polylines and the Bubble Layer to create Symbols from image URLs.
Line Layer example – Storms
Example of Line Layer using Storm data to visualize historical storms.
EU statistics example
Uses: Bubble Layer with latitude and longitude measures, bubble size and color by measure, Area Layer with location ID for country codes, area color by measure, transparency.
Drill down example
A drill down example with three different ways of using drill down data to visualize data. Sheet 1: Drill down based on State - County - Zip Sheet 2: Drill down based on Zip.
Heatmap example
Uses: Heatmap Layer, drill down with layers active in different levels, Bubble Layer with visibility restricted to resolution limits.
US flight delay example
This example shows how Line Layer, among others, can be used to show routes between different positions and include average departure/arrival delays in the appearance of the lines.
The examples requires v 12 or later of QlikView.
Sense Map chart
Example adding a WMS background
1. Add in Content Security Policy (Qlik SaaS)
Origin: nowcoast.noaa.gov Directive : connect-src and img-src
2. Add Map chart
3. Add background layer WMS
url: https://nowcoast.noaa.gov/arcgis/services/nowcoast/radar_meteo_imagery_nexrad_time/MapServer/WMSServer
version:1.3.0
crs: EPSG:3857, transparent, png, layer: Image
Note, use CRS 3857 if the base map has the Mercator projection (default).
Pick CRS 4326 if the base map has the Adaptive projection.
Link to documentation and example.
(QGA Extension map, old kept for reference)
Start by figure out the correct parameters. In this case the source is a WMS with data from the Dutch city Zaanstad.
Note, the urls below has chnaged and not working anymore, principles still applies)
{
"appId": "58f563b6-ccda-45b0-926c-e2992ca8b470",
"recurrence": [
"RRULE:FREQ=MINUTELY;INTERVAL=15"
],
"startDateTime": "2022-03-23T00:00:00",
"timeZone": "America/New_York",
"type": "scheduled_reload"
}
This guide was written for use with the Windows PowerShell program. While PowerShell can be run on non Windows systems, use of bash techniques for parsing json (e.g. jq) is possible but not covered in this guide.
Reload a specific app every 15 minutes
# Specify the appId
$appId = '<myAppId>'
# Define the rrule
$schema = 'RRULE:FREQ=MINUTELY;INTERVAL=15'
$startDate = ((Get-Date)).ToString("yyyy-MM-ddT00:00:00") # Get the current date and convert to required format
# Get the app's reload tasks
$reloadTask = qlik reload-task ls --appId $($appId) | ConvertFrom-Json
# Delete the associated reload task, if present
if($reloadTask.data.Length -gt 0) {
$null = qlik reload-task rm $($reloadTask.data.id)
}
# Create the task
$null = qlik reload-task create --appId $appId --recurrence $schema --startDateTime $startDate --timeZone "America/New_York" --type "scheduled_reload"
Reload a specific app every hour on Thursday
# Specify the appId
$appId = '<myAppId>'
# Define the rrule
$schema = 'RRULE:FREQ=HOURLY;INTERVAL=1;BYDAY=TH'
$startDate = ((Get-Date)).ToString("yyyy-MM-ddT00:00:00") # Get the current date and convert to required format
# Get the app's reload tasks
$reloadTask = qlik reload-task ls --appId $($appId) | ConvertFrom-Json
# Delete the associated reload task, if present
if($reloadTask.data.Length -gt 0) {
$null = qlik reload-task rm $($reloadTask.data.id)
}
# Create the task
$null = qlik reload-task create --appId $appId --recurrence $schema --startDateTime $startDate --timeZone "America/New_York" --type "scheduled_reload"
Reload a specific app on the 2nd Monday of the month
# Specify the appId
$appId = '<myAppId>'
# Define the rrule
$schema = 'RRULE:FREQ=MONTHLY;WKST=MO;BYDAY=MO;BYSETPOS=2'
$startDate = ((Get-Date)).ToString("yyyy-MM-ddT00:00:00") # Get the current date and convert to required format
# Get the app's reload tasks
$reloadTask = qlik reload-task ls --appId $($appId) | ConvertFrom-Json
# Delete the associated reload task, if present
if($reloadTask.data.Length -gt 0) {
$null = qlik reload-task rm $($reloadTask.data.id)
}
# Create the task
$null = qlik reload-task create --appId $appId --recurrence $schema --startDateTime $startDate --timeZone "America/New_York" --type "scheduled_reload"
Today, I'd like to share with you our current App backup solution using Powershell and Qlik-Cli.
As you know, a production environment needs backups and Qlik Sense Enterprise does not offer such a thing by default so I decided to build a solution.
Using Qlik-Cli for Windows, I put in place a solution that will not only backup my published and unpublished apps but will also create a folder structure to match your streams.
The unpublished apps are backed up inside the "My Work" folder using the app owner's name as a directory name. This allows to easily find the app owner when performing a search in the folders.
Square brackets in the App's name will be removed because you cannot create a file with these characters in Windows.
The script is scheduled using the Windows Task Scheduler with the following command:
Here's the code:
$ErrorActionPreference = "Stop"
Try
{
# set export drive and directory
D:
cd D:\QlikBackups
# connect to the Qlik Server. Replace <ServerName> with your Qlik Sense hostname
Connect-Qlik -ComputerName <ServerName> -UseDefaultCredentials -TrustAllCerts
# Export each apps from the previously defined streams to qvf
Get-QlikStream | % {New-Item -Name ".\$($_.name)" -Force -ItemType 'Directory'} | foreach {Get-QlikApp -filter "stream.name eq '$($_.name)'"} | foreach {Export-QlikApp -skipdata -id $_.id -filename "$($_.stream.name)\$($_.name -replace '[[\]]','').qvf"}
# set the export folder to the My Work area for unpublished apps
cd "D:\QlikBackups\My Work"
# Create a folder structure for all the app owners
Get-QlikApp -full -filter "published eq False" | % {New-Item -Name ".\$($_.owner.userId)" -Force -ItemType 'Directory'}
# Export each app into their folder
Get-QlikApp -full -filter "published eq False" | foreach {Export-QlikApp -skipdata -id $_.id -filename "$($_.owner.userId)\$($_.name -replace '[[\]]','').qvf"}
}
Catch # In case of error, send an email to the Qlik administrators
{
$ErrorMessage = $_.Exception.Message
$FailedItem = $_.Exception.ItemName
$Time=Get-Date
"Error: $FailedItem Message: $ErrorMessage Time: $Time" | out-file d:\log\QlikBackup.log -append
$FailMailParams = @{
To = 'qlikadmin@MyCompany.com'
From = 'MyQlikServer@MyCompany.com'
Port = '25'
SmtpServer = 'smtprelay.MyCompany.com'
Subject = 'MyQlikServer Backup Failure'
Body = "The backup failed. The error message was: $ErrorMessage"
}
Send-MailMessage @FailMailParams
}
My next steps are: