Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
This post explains how to connect to an Oracle database using the OLE DB connector and a tnsnames.ora file.
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:
Link table example 3
Script:
Sales:
LOAD
Year & '_' & Month & '_' & Branch & '_' & [Item Number] as SalesKey,
//"Year",
//"Month",
// Branch,
//"Item Number",
"Customer Number",
"Invoice Number",
"Order Number",
"Salesman Number",
"Invoice date",
"Sales Amount",
"Sales Qty",
"Cost Amount",
"Margin Amount",
"Unit of Measure"
FROM [lib://DataFiles/LinktableExample.xlsx]
(ooxml, embedded labels, table is Sales);
Inventory:
LOAD
Branch & '_' & [Item Number] as InvKey,
//Branch,
//"Item Number",
"On Hand Qty"
FROM [lib://DataFiles/LinktableExample.xlsx]
(ooxml, embedded labels, table is Inventory);
Purchasing:
LOAD
Year & '_' & Month & '_' & Branch & '_' & [Item Number] as POKey,
//"Year",
//"Month",
//Branch,
// "Item Number",
"PO Number",
"Req Delv Date",
"PO Amount",
"Ordered Qty"
FROM [lib://DataFiles/LinktableExample.xlsx]
(ooxml, embedded labels, table is Purchasing);
/* Create Link Tables */
//Sales
LinkTable:
Load DISTINCT
Year & '_' & Month & '_' & Branch & '_' & [Item Number] as SalesKey,
Branch & '_' & [Item Number] as InvKey,
Year & '_' & Month & '_' & Branch & '_' & [Item Number] as POKey,
Year,
Month,
[Branch],
[Item Number]
FROM [lib://DataFiles/LinktableExample.xlsx]
(ooxml, embedded labels, table is Sales);
//Inventory
LinkTable:
Load DISTINCT
Null() & '_' & Null() & Branch & '_' & [Item Number] as SalesKey,
Branch & '_' & [Item Number] as InvKey,
Null() & '_' & Null() & Branch & '_' & [Item Number] as POKey,
Null() as Year,
Null() as Month,
[Branch],
[Item Number]
FROM [lib://DataFiles/LinktableExample.xlsx]
(ooxml, embedded labels, table is Inventory);
//Purchasing
LinkTable:
Load DISTINCT
Year & '_' & Month & '_' & Branch & '_' & [Item Number] as SalesKey,
Branch & '_' & [Item Number] as InvKey,
Year & '_' & Month & '_' & Branch & '_' & [Item Number] as POKey,
Year,
Month,
[Branch],
[Item Number]
FROM [lib://DataFiles/LinktableExample.xlsx]
(ooxml, embedded labels, table is Purchasing);
Hope this help
Vikas
Hi All,
As we all know Qlik Analytical Platform is quite new in market. People are still in confusion as what QAP is, how it is different than Qlik Sense Enterprise. How to configure QAP Server, Manage QAP and especially what exactly the output of QAP. There are lots of tickets which give you chunk of information like difference between QAP and Qlik Sense Enterprise, how to reload on QAP server when there is no HUB under QAP but there is nowhere how to configure a QAP solution from scratch to end with details.
This document guide you to know what QAP is , how it is different than QSE, setup QAP Server, create and publish Mashup(Embed Analytics ) a, manage QAP Objects and reload application on QAP when there is no HUB at all.
Question: Why Qlik Sense client needs QAP ?
Answer:
QAP setup needs knowledge of Qlik Sense Enterprise (server configuration with security rules) and web developer skills (css and java script and basic HTML) who will help you to embed Qlik Object to web portal.
I have attached one QAP product presentation, you may start with it then below tutorial video so you have enough functional knowledge of product.
Important video tutorial of QAP:
Let’s start from beginning:
Difference b/w Qlik Sense Enterprise and Qlik Analytical Platform:
In principle QAP and QSE is same but in general QAP is subset of QSE means QSE without HUB(No Self Service). QAP is a solution of embed analytics. If no self service is there in QAP it means no "create things" but still developers can create visuals by APIs.
Https://HostName/hub you can view the application but when you open it, it will give you an error you don't have access pass, it means you can't view any apps object on hub.
QAP enables you to display sheet or charts into your website.
Commercial difference, QAP has core based license model unlike QSE which has token based license model (It means no user and login passes, which means you just need to grant the access to users or authorized users to the content which is embedded in web portal )
Recently Qlik introduced core bases license for self service too.
QAP is intended for using our APIs (Extensions, Mashups etc.) to deploy custom solutions.
The Qlik Sense client is disabled in QAP (when you will login to hub you would view the streams and apps but when you will click on any app, it will give you error of access passes).
It has same installation package as QES but applying a QAP license key will disable hub it means you can view the hub, streams list, and application icons but apps objects like sheet, charts, measures and dimensions will not open on HUB. It will give you an error, you hve no access passes.
QAP license policy: when a client buys a QAP token, it comes with minimum 4 cores, it means no matter how many cores or virtual processors are available on deployment server, it will only consume or utilize 4 core among all available cores. So, let’s say client's server has 8 cores or 16 logical processors on Qlik Sense Enterprise server and your application size is 1 GB and you are planning to use same application on QAP, So when you import this application to QAP, It will not work as it works on QSE sever cause QAP(as per the license capacity) will consume only 4 cores out 8 cores and your 1 GB application need 8 cores to perform or load objects like QSE.
Note: Do not be confused, what will happen when you will activate the Qlik Server with QAP license, you will get everything same i.e. QMC as Qlik Sense Enterprise but there will be no Tokens means you can't create any user or login pass which we use to authorize users to access the Qlik Sense content.
To implement QAP server, configured it security with custom properties so you would manage security of data for users with
https://community.qlik.com/docs/DOC-18066
These 9 points will create a stream, import the application and publish the application to the newly created stream and grant access to application and app objects.
Try to use Dev-Hub to view the object i.e single configurator.
Now, we will add one more new security rule which will grant all the users to access the APIs like extensions, mashups, Widget, Single configurator.
***You may create one new custom property QAPExtension with resource type Extension and User and the create a new security rule with Extension Template and write a security rule as:
((User.@QAPExtension=resource.@QAPExtension))
Then go to the extension by Click one start => Extensions => select your extension(Mashup) => go to custom properties and click on the Space bar and select the value you have given while creating Custom properties do the same exercise for users too .
Now, we don’t need to create any custom property because QAP is for all users (no limit) above activity started with *** is when you created a mashup and then you need to provide access of some particular Extension(Mashup) to any specific users.
So, for QAP, write a simple security rule as with template Extension:
((user.name="*" or resource.name="*"))
Which means all user will access the all the APIs (extensions, mashups, Widget, Single configurator).
Often, People ask what if my client hasn't any web portal so in that case above Mashup solution will work, Mashup is kind of website(.html file) or web solution.
This is best with Qlik comes Sense as we can create a HTML page with our Qlik Objects so easily(Basic HTML and JS and CSS knowledge requires).
Now point comes, if all user will come how to secure the data, here comes the real QAP solution,
Generally what QAP says, create an application on Qlik Enterprise or Desktop, import on the QAP server and publish its Objects to client website (Mashup is a HTML page but it’s not a web portal).
So above, you have imported an application, created stream, published application, granted access to all users. What is left now, go to single configurator, select one object, there will be two links come on top side, Iframe and URL, Copy anyone and go to the website page where you need to show these objects and paste it(Please take the help of web developer because every object needs a proper space and alignment).
If any user who is not authorized to view Qlik objects but has rights to login web portal where Qlik Sense objects embedded then it will show an error, so you may ask your web designer to handle this case and put any image instead of INVALID OBJECT message from Qlik Sense.
Now when any user will come it will see an error, access denied or ask for credentials , so You may configure the single sign on here ,Please refer the very useful document for single sign on :
Last Point, how to manage the QAP server application. I mean, reload and all. So, You can’t open any application on QAP HUB and there will be no script editor so how to reload if you have imported the application from Qlik sense enterprise:
If you have imported the apps from another Qlik Sense Server the required data connections are unfortunately not imported together with the qvf-file. That is probably why the tasks fail since the data connections are missing. Check in QMC > Data Connections if they are there and if they are properly set up.
Please refer this article to reload data in QAP: https://qliksupport.force.com/articles/000025412
” When you import an app developed on Qlik Sense Desktop, existing data connections are imported to the QMC. When you export an app from a server, existing data connections are not exported with the app.”
Since the QAP is a Qlik Sense-server without the "hub" and aimed for integration purposes only you have to find a way to import the data connections into the QAP QMC for reloads to work. One way could be to create an empty app in Qlik Sense Desktop with the required data connections and then import this qvf into the QAP. Then you can manage and set up the imported data connections properly in the QAP QMC.
Reach to me for further assistance, Please drop an email to kumar.rohit1609@gmail.com
Add me on Linked In : https://in.linkedin.com/pub/rohit-kumar/2b/a15/67b
Add yourself on Qlik intellectuals page on Facebook at https://www.facebook.com/QlikIntellectuals
Please like this page or add as bookmark and add your ratings so my I will know how effective my solution is for Qlik Users.
You may add your queries below so I would come up with solution. I will try to keep update this document with more powerful inputs. Your queries and inputs will help me to improve the quality of this solution. The aim is to make a perfect document which will guide you to a perfect solution.
Previously, I created a document for calculating working hours between two dates, excluding weekends (Saturday and Sunday) and holidays, using the networkdays function. Please refer to the link below.
Working-Hours-Calculation-excluding-weekends-and-holidays
However, what if the weekends are not Saturday and Sunday (e.g., Thursday and Friday)? Or if only Sunday is considered a weekend, not Saturday? In such cases, the networkdays function won't be applicable. While there are many ways to address this, I will demonstrate one approach in this post.
I have detailed all scenarios step by step in the attached Word document and included example QVF files. This code is compatible with QlikView as well.
The logic described here can be applied to any defined weekends, but for regular weekends (Saturday and Sunday), I recommend using the built-in networkdays function for working day calculations. For working hour calculations, please refer to my previous document linked below.
Please feel free to share any suggestions.
This doc and app shows a workaround how to make cyclic groups for dimensions and measures. Qlik Sense 2018 November or later is required. The workaround is based on a variable and the button. The solution is not self service but no extensions or add-ons are required and using master items simplifies the usage.
Cyclic Dimension Group
Write dimension dependent expressions using vDimension (instead of GetCurrentField), ex:
=Sum(Sales)/ Sum(Total Aggr(Sum(Sales), $(=vDimension)))
For convenience, add master dimension CyclicDimension =$(vDimension) set to label =vDimension and make the button a master visualization.
Cyclic Measure Group
For convenience, add master measure CyclicMeasure =$(vMeasure) set to label =vMeasure and make the button a master visualization.
This technique has been mentioned before in:
Top-10-Viz-tricks-Qonnections-2019
Top-10-Viz-tricks-Part-2
There are several proposals for cyclic groups, thanks for the inspiration:
Juraj Misina, https://dataqlues.com/getobjectfield-function-and-alternate-dimensions/
Welcome to the QS CSS MasterClass.
Motivation:
In my career as a PreSales, I need to create quite a few "user-appealing-applications". Sometimes users request a specific design or specific functions I need to implement in Qlik Sense. As we all know, Qlik Sense is built for simplicity & self-service and sometimes it could be challenging to achieve the desired result. But through the last couple of years, there were a lot of tips and tricks around using CSS to create completely new designs and functions to implement a better information design concept.
This is where the MasterClass starts. I have created an application that gathers a couple of these tricks and explains them more in detail. In addition to that, it is very easy to understand because you can see the result directly within a Qlik Sense App. If you think this sounds interesting, take a couple of minutes and join my short tour through the app. I won't cover all aspects in detail. This tour will give you an overview of the documented and used tricks within the app.
Content:
The following list will give you a brief overview of what topics are focused on the specific sheet within the app.
Sheet | Description |
You can add CSS definitions to your app by using themes or by using so-called "helper- objects". On this sheet, I will explain when you should use which option. | |
A "helper-object" carries and injects the CSS definition on a specific sheet. This sheet helps you to hide this object and which objects can be used for it. | |
This example demonstrates how to add better guidance to your dashboards by segmenting your background. | |
Sometimes selections can be mandatory to consume a dashboard, or the creator likes to guide the user through the filter pane by using colored filter boxes. I show you how. | |
How to hide objects like the selection bar or elements within context-menus in case these functions shouldn't be used in the app or on this sheet? | |
Adding background-pictures to your dashboard can spice up the overall flavor of your dashboards. This can be used for segmentation or just to add some style. | |
In this section, we will completely change the look and feel of a straight- and pivot table. | |
Let's create an illusion by just moving our objects closer together. After that, I'll look like we just have one. | |
This sheet explains the easiest way to implement your own font by using a custom theme. It's just a few lines of code. | |
No matching grid? This trick shows you how to create your own grid for a specific sheet by changing the metadata through Qlik Engine API Explorer. |
Installation:
Under "Attachments" you can find the required package. The zip package includes a qvf file (Qlik Sense - CSS MasterClass V 1.0.qvf) and an extension (ShowHTMLfromMeasure). After importing the extension and app we need to change a quick configuration because the app has a different ID on your system now.
Open sheet called "Using Background Pictures". Normally this sheet has a background image. This gets referenced over the internal app-ID. Click on "Edit Sheet" and select the displayed CSS box ("CSS config HERE"). Navigate to submenu "Styles" and change the used app-ID in "Styles (CSS)" to your app-ID (displayed in the URL). Now you should see a background picture on this sheet.
Usage:
Every sheet has the same structure. First, a description explains the trick in general and how it's working. On most of the sheets, you also get the explanation for the used CSS selectors. On the right-hand side, you can see the used code in a black code box. You can't copy the code from here. To do so enter the "edit-mode" and click on the "CSS config HERE" button. This object is always the "Helper-object" that carries the used and explained CSS code. Navigate to the "Styles" submenu and copy the code from the "Styles (CSS)" window. I recommend using an external editor to modify or review the CSS code.
In case you like to transfer the trick to your dashboard you just need to change the object ID. If you don't know how to find the object ID this will be explained on sheet "Hide (Helper-) Objects".
Link Table :
Please find simple link table concept implemented with multiple fact tables. Hope definitely help new comers will help to clear concept of link tables.
Data Modelling is technique in qlik for linking tables we can use link tables concept please refer ppt .
Qlik Tips: Rules for creating a Key/Link Table in QlikView and this post
ref: https://www.analyticsvidhya.com/blog/2014/12/remove-synthetic-key-concatenation-link-table-qlikview/
Please find attached excel & data model containing how to implement a link table.
Attached Solution Linktable2
Hope this help to new comers.
Thanks
Vikas
Hi Team,
We can make use of Valuelist effectively to show KPI's row wise as a custom report in Qlik Pivot table sample attached for ready reference.
Hope this helps.
Vikas
A common use case in Qlik Sense is to generate some test data in order to demonstrate a function or to run some testing. The AutoGenerate function is a great way of getting a large number of rows with some made up data to test or demo over.
Recently I was asked to implement a Correlation Coefficient and having not used the correl function in Qlik before I wanted to check that it gave sensible results before putting it into a live app (spoiler: it works fine). To do this I used AutoGenerate to give me X values from 1 to 1,000 and then various Y values to give positive, negative and non correlated data sets.
This app gives the various views of the correlation coefficient, but more importantly it shows how to generate test data, including random values, random selections of dimensions and generated dummy IDs.
The app is accompanied by a blog post, which can be found here:
https://www.quickintelligence.co.uk/generating-test-data-in-qlik-load-scripts/
If you have any comments or suggestions of other ways you can autogenerate test data please comment on this document, or on the comments on the blog post.
Cheers!
Steve
Hi All,
Created simple application State->District wise layer map using KML. Application used container object which has ability when you click on state automatically further drill down district will be display for India country.
Hope this will be useful for new comers who wanted to learn google map using layer area option.
Thanks
Vikas
A list of all Operations and Connections available through the Qlik GeoAnalytics Connector
A more in depth analysis, including Use Cases and step by step instructions in setting up the following Operations, with screenshots:
[Paragraph format. Descriptive text here. See Content Guidelines for details. You can remove sections that are not needed for your article. If subheaders are needed, use heading 3 or heading 4 formats.]
By using a Multi-KPI object we can inject custom CSS onto the sheet to override the default limitations on pivot & straight tables
Step1:
Drag a Multi-KPI object onto the sheet and add a dummy measure example = 1;
Next, on the Properties panel of the Multi-Kpi object navigate to Appearance >> Styles
Step2:
Paste the custom below
For Straight Tables add the below CSS snippet in the Styles(CSS) box
.qv-st .qv-st-value .qv-st-value-overflow {
max-height: none;
}
For Pivot Tables add the below CSS snippet in the Styles(CSS) box
.qv-pt .cell .value {
max-height: none;
white-space:pre
}
As shown below now each cell will fit to content of the cell based on line breaks in the content
Cheers
Vineeth P