<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title></title>
	<atom:link href="https://www.quickintelligence.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.quickintelligence.co.uk/</link>
	<description></description>
	<lastBuildDate>Fri, 21 Nov 2025 15:57:16 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>

<image>
	<url>https://www.quickintelligence.co.uk/wp-content/uploads/2017/05/cropped-QuickIntelligence_Square-32x32.png</url>
	<title></title>
	<link>https://www.quickintelligence.co.uk/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">48890870</site>	<item>
		<title>Starting External Services From Qlik Sense Load Scripts</title>
		<link>https://www.quickintelligence.co.uk/starting-external-services-from-qlik-sense-load-scripts/</link>
					<comments>https://www.quickintelligence.co.uk/starting-external-services-from-qlik-sense-load-scripts/#respond</comments>
		
		<dc:creator><![CDATA[Steve Dark]]></dc:creator>
		<pubDate>Fri, 21 Nov 2025 15:57:16 +0000</pubDate>
				<category><![CDATA[Qlik Sense Tutorials]]></category>
		<category><![CDATA[IFTTT]]></category>
		<category><![CDATA[Load Script]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Sense]]></category>
		<guid isPermaLink="false">https://www.quickintelligence.co.uk/?p=1505962</guid>

					<description><![CDATA[<p>We live in an increasingly interconnected world and various systems need to talk to each other to exchange information and to cause events to happen. Webhooks are one of the ways that messages can be sent between systems and this blog post explains how you can put these to work for you in your Qlik  [...]</p>
<p>The post <a href="https://www.quickintelligence.co.uk/starting-external-services-from-qlik-sense-load-scripts/">Starting External Services From Qlik Sense Load Scripts</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>We live in an increasingly interconnected world and various systems need to talk to each other to exchange information and to cause events to happen. Webhooks are one of the ways that messages can be sent between systems and this blog post explains how you can put these to work for you in your Qlik load script.<span id="more-1505962"></span></p>
<h3>Why Call A Webhook?</h3>
<p>In my previous blog post (<a href="https://www.quickintelligence.co.uk/start-a-qlik-sense-cloud-reload-from-a-webhook/">Start a Qlik Sense Cloud Reload from a Webhook</a>) I described how to create a webhook using <a href="https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_QlikAutomation/introduction/home-automation.htm">Qlik Automations</a> which can start a reload of any app in your Qlik Cloud tenant. One of the places you might want to trigger this from is from a Qlik load script. This way you can call a reload of one or more Sense apps at the end of another script, perhaps dependant on data or status.</p>
<p>Triggering a Qlik Automation is one example of why you might want to fire a webhook, but in this post I want to share another example &#8211; raising an alert when things are broken.</p>
<p><img fetchpriority="high" decoding="async" src="https://www.quickintelligence.co.uk/wp-content/uploads/2025/11/Raise-Alert-From-Qlik-Using-A-Load-Script-Webhook-400x224.png" alt="Starting External Services From Qlik Sense Load Scripts" width="400" height="224" class="aligncenter size-fusion-400 wp-image-1505981" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2025/11/Raise-Alert-From-Qlik-Using-A-Load-Script-Webhook-200x112.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/11/Raise-Alert-From-Qlik-Using-A-Load-Script-Webhook-300x168.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/11/Raise-Alert-From-Qlik-Using-A-Load-Script-Webhook-400x224.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/11/Raise-Alert-From-Qlik-Using-A-Load-Script-Webhook-600x335.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/11/Raise-Alert-From-Qlik-Using-A-Load-Script-Webhook-768x429.png 768w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/11/Raise-Alert-From-Qlik-Using-A-Load-Script-Webhook.png 800w" sizes="(max-width: 400px) 100vw, 400px" /></p>
<h3>How Do You Notify When Your Notifications Are Broken?</h3>
<p>Something we always set up when building customer environments is sufficient notifications to make us aware when anything is wrong. On Qlik Sense Client Managed this is essential, as there is very little out of the box, and on Cloud it needs to be set up space by space, so some things can be missed. Sometimes we are working on a secure site where SMTP relaying from within the site is not permitted. Other times it can be that communication between the Qlik server and the SMTP server is down due to network issues, so the route to let us know there is an issue is broken along with the rest of the network. In these cases we need a way to get a message out, when nothing else is working.</p>
<p>Something that is likely to work in Sense, even when all else is failing, is calling a URL to extract data. If that URL is a webhook then that call can then trigger an action. What we have is a an applet set up in <a href="https://ifttt.com/">IFFTT</a> (If This Then That) which sends an email via GMail containing values from the parameters of the webhook called. I won&#8217;t go into setting up that applet here, as it will be slightly different if you want to use a different mail client or call a different service, but I have given details on this in a previous blog post on <a href="https://www.quickintelligence.co.uk/ifttt-webhooks-qlik-cloud/">Inserting Qlik Capacity Usage Into a Spreadsheet</a>.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505966" src="https://www.quickintelligence.co.uk/wp-content/uploads/2025/11/IFTTT-Gmail-via-Webhook.png" alt="IFTTT Gmail via Webhook" width="400" height="174" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2025/11/IFTTT-Gmail-via-Webhook-200x87.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/11/IFTTT-Gmail-via-Webhook-300x131.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/11/IFTTT-Gmail-via-Webhook.png 400w" sizes="(max-width: 400px) 100vw, 400px" /></p>
<p>Once you have a webhook set up that can send the notification you are ready to build an app that triggers that webhook when there is a problem.</p>
<h3>Raise a Notification When Files Go Stale</h3>
<p>The most basic measure of everything being up and working is that files that are used by your Qlik environment are all up to date. If the applications you wish to monitor do not currently create any files then it is a simple job to add a <a href="https://www.quickintelligence.co.uk/write-csv-qlikview-store/">STORE</a> statement to write a small text file that can be checked for. The application we shall build here then has an inline table (which will work even if all else is broken) with a list of file locations and how old those files can go before we want to be told about them.</p>
<p>Before building the load script for this app you will need to set up a REST connector that we can pass parameters in to. To do this build a new <a href="https://help.qlik.com/en-US/connectors/Subsystems/REST_connector_help/Content/Connectors_REST/Load-REST-data/Load-data.htm">REST connector</a>, set it to a placeholder URL (I tend to use <a href="https://jsonplaceholder.typicode.com/posts">https://jsonplaceholder.typicode.com/posts</a>), set the type to <strong>GET</strong>, ensure that <strong>Allow WITH CONNECTION</strong> is ticked and give it a name of <strong>Generic GET</strong>.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505968" src="https://www.quickintelligence.co.uk/wp-content/uploads/2025/11/Create-Qlik-REST-Connection.png" alt="Create Qlik REST Connection" width="550" height="141" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2025/11/Create-Qlik-REST-Connection-200x51.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/11/Create-Qlik-REST-Connection-300x77.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/11/Create-Qlik-REST-Connection-400x103.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/11/Create-Qlik-REST-Connection.png 550w" sizes="(max-width: 550px) 100vw, 550px" /></p>
<p>Once that connection is in place you can build the load script.</p>
<p>First you will need to set up some variables for use later in the script. Obviously the webhook parameter will need to be changed to match the webhook that you want to call.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">let vEnv = 'My Qlik Sense Tenant';
let vLib = 'DataSpace:';
let vGET = '$(vLib)Generic GET';
let vQVDs = 'lib://$(vLib)DataFiles/';
let vTimestamps = '$(vQVDs)Timestamp/';
let vWebhook = 'https://maker.ifttt.com/trigger/error/with/key/your-webhook-key-here';

let vLastLoad = now();</code></pre>
<p>Then you need to build the table of files that you want to be checking. These could be QVD files or small files that are written as part of a load script to indicate that the load script has completed. The table requires the full path to each file to be checked, how many hours old the file can get before an alert is raised and what label is to be used in the alert when that file becomes old.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">tmp:
LOAD
    File,Threshold,Name
INLINE [
File,Threshold,Name
$(vQVDs)Sales.qvd,1,Sales Application
$(vTimestamps)QVDGenerateCompleted.csv,3,QVD Generation Application
];</code></pre>
<p>That inline table can then be transformed to convert the hour given in the load script into a time delta to come off the current time, which can then be taken off the current time to work out the time that the file should be newer than. The actual date of the file also needs to be looked up. These two dates can then be compared to find the delta and to flag whether the file is old.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">FileAges:
LOAD
    *,
    if(FileDate &lt; Target, 'Yes', 'No') as Old,
    num((24)*(FileDate - Target), '0.00') as Difference
    ;
LOAD
    File,
    Threshold,
    Name,
    Date(alt(ConvertToLocalTime(FileTime(File), 'London'),0), 'DD MMM YYYY hh:mm') as FileDate,
    Date((LocalTime('London') - ((1/24)*Threshold)), 'DD MMM YYYY hh:mm') as Target
RESIDENT tmp;

DROP TABLE tmp;</code></pre>
<p>This table then needs to be aggregated to find out how many of the files checked are older than they should be. That value needs to be Peeked out into a variable.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">Old:
LOAD sum(1) as Old RESIDENT FileAges WHERE Old = 'Yes';
let vOld = alt(Peek('Old', -1, 'Old'), 0);
DROP TABLE Old;</code></pre>
<p>Now we get to the actual point of the app and the demonstration. If there are any old files, we need to do the call to the webhook endpoint along with a payload that tells us which environment is affected and how many of the files are stale.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">if alt(vOld, 0) &gt; 0 then
    SET errormode = 0;
    LIB CONNECT TO [$(vGET)];
    SQL SELECT "col_1" FROM CSV (header off, delimiter ",", quote """") "CSV_source"
    WITH CONNECTION (URL "$(vWebhook)?value1=$(vEnv)&amp;value2=$(vOld)%20Files%20Are%20Older%20Than%20They%20Should%20Be");
    SET errormode = 1;
end if

TRACE There are $(vOld) files older than expected;</code></pre>
<p>To wrap up, because we are tidy Qlik developers, we clear down the variables that we have used.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">let vEnv =;
let vWebhook =;
let vLib =;
let vGET =;
let vQVDs =;
let vTimestamps =;

Exit Script;</code></pre>
<p>That is it for the load script, and that is all you need to make this work. What you might want to do though, as the list of files checked is in a table in the data model along with their status, is to add a table to a sheet in the app listing the six columns in the <strong>FileAges</strong> table, with some conditional formatting to show when files are old. I would also add a button, which can then refresh the app without going into the load script.</p>
<h3>But What If Even This App Cannot Run?</h3>
<p>If you are running Sense on a Client Managed server it is possible (although very unlikely) that even this application will not be able to run and call the webhook, perhaps if someone has unplugged the server in order to recharge their mobile phone. In this case we need an external service to monitor what is going on. If the server is (as is most likely) behind a firewall that external service will not be able to reach in and check the status. In this case we want a service outside of the network which is expecting to hear from the server at a regular beat which can then raise an alert if it doesn&#8217;t hear anything.</p>
<p>This is exactly what I am going to cover in my next blog post, pulling together elements of this post and the previous post. This solution will use a webhook on a Sense Cloud tenant which calls a reload of a script that writes a to a QVD. There is also a separate application that checks the date of this QVD and notifies if that has not been updated in a specified window. The history of the webhook being called is persisted, so a history of when the calling server was up and able to reach the outside world is recorded, giving an accurate account of uptime on the server.</p>
<p><img decoding="async" class="aligncenter size-fusion-600 wp-image-1505969" src="https://www.quickintelligence.co.uk/wp-content/uploads/2025/11/Sense-Server-Uptime-Matrix-600x116.png" alt="Sense Server Uptime Matrix" width="600" height="116" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2025/11/Sense-Server-Uptime-Matrix-200x39.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/11/Sense-Server-Uptime-Matrix-300x58.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/11/Sense-Server-Uptime-Matrix-400x77.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/11/Sense-Server-Uptime-Matrix-600x116.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/11/Sense-Server-Uptime-Matrix-768x149.png 768w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/11/Sense-Server-Uptime-Matrix.png 780w" sizes="(max-width: 600px) 100vw, 600px" /></p>
<p>If you have any comments on anything you would like to see covered in that blog post, or anything related to this blog post, please use the comments box below to get in touch.</p>
<h3>Other Uses For Calling A Webhook From The Qlik Load Script</h3>
<p>There is literally no end to what you can achieve by calling webhooks, particularly if you use a tool such as <a href="https://ifttt.com/">IFTTT</a>.</p>
<p>Another use you might want to consider, if you are using Qlik Sense Cloud, is <a href="https://www.quickintelligence.co.uk/start-a-qlik-sense-cloud-reload-from-a-webhook/">kicking off a reload using a webhook</a>. In my previous blog post I described how a Qlik Automation can be set up to be triggered from a webhook to do a reload. If at the end of the load script for one app you call the webhook with the correct parameter to kick off the next reload in a chain this reload chain will work however the reload is started, interactively or from a schedule. This gets around the limitation that Qlik Sense Cloud reload chaining from the hub presently has, where the next reload in the chain only takes place if the previous reload was started from a particular schedule. This reload chaining approach also allows for logic to be applied around whether the next reload should take place or not, perhaps the front end should only reload if there has been a change to the backend data?</p>
<p>I hope this post has given you plenty of inspiration of how you can link different services together within, and beyond, your Sense environment.</p>
<p>The post <a href="https://www.quickintelligence.co.uk/starting-external-services-from-qlik-sense-load-scripts/">Starting External Services From Qlik Sense Load Scripts</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.quickintelligence.co.uk/starting-external-services-from-qlik-sense-load-scripts/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1505962</post-id>	</item>
		<item>
		<title>Start a Qlik Sense Cloud Reload from a Webhook</title>
		<link>https://www.quickintelligence.co.uk/start-a-qlik-sense-cloud-reload-from-a-webhook/</link>
					<comments>https://www.quickintelligence.co.uk/start-a-qlik-sense-cloud-reload-from-a-webhook/#respond</comments>
		
		<dc:creator><![CDATA[Steve Dark]]></dc:creator>
		<pubDate>Fri, 31 Oct 2025 18:15:05 +0000</pubDate>
				<category><![CDATA[Qlik Sense Tutorials]]></category>
		<guid isPermaLink="false">https://www.quickintelligence.co.uk/?p=1505920</guid>

					<description><![CDATA[<p>Sometimes the options available in the Sense Cloud scheduler are not sufficient to build the application reload chain that is required. Perhaps loads need to happen in response to external events, or be started by someone that you don’t want to give that level of access to in Cloud. A simple Qlik automation can solve  [...]</p>
<p>The post <a href="https://www.quickintelligence.co.uk/start-a-qlik-sense-cloud-reload-from-a-webhook/">Start a Qlik Sense Cloud Reload from a Webhook</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Sometimes the options available in the Sense Cloud scheduler are not sufficient to build the application reload chain that is required. Perhaps loads need to happen in response to external events, or be started by someone that you don&#8217;t want to give that level of access to in Cloud. A simple Qlik automation can solve this by kicking off the reload from a webhook. This post shows you how.<span id="more-1505920"></span></p>
<h3>What are Webhooks?</h3>
<p>Webhooks are a simple way of getting disparate systems to talk to each other. They allow the triggering of events simply by calling a URL, this could be from a browser bookmark, a link on a page or in code. I&#8217;ve previously blogged on a use of webhooks in the article <a href="https://www.quickintelligence.co.uk/ifttt-webhooks-qlik-cloud/">Using IFTTT and WebHooks To Send Data From Qlik Sense</a>.</p>
<p>In a Sense context the webhooks can be called by creating a Link in the Sense Hub, adding a link to a Button object, a value in a table set to HTML or by calling the webhook from within the load script (using a REST connector to make the call). Triggering from the load script allows the building of reload chains that are not dependant on the Sense scheduler, and for reloads that are data dependant &#8211; for instance calling a reload of another app only when certain data are found in the current app.<br />
<img decoding="async" src="https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Webhook-to-Qlik-400x261.png" alt="" width="400" height="261" class="aligncenter size-fusion-400 wp-image-1505928" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Webhook-to-Qlik-200x131.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Webhook-to-Qlik-300x196.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Webhook-to-Qlik-400x261.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Webhook-to-Qlik-600x392.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Webhook-to-Qlik-768x502.png 768w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Webhook-to-Qlik-800x522.png 800w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Webhook-to-Qlik.png 980w" sizes="(max-width: 400px) 100vw, 400px" /></p>
<h3>What Are Qlik Automations?</h3>
<p>You may have noticed the button <strong>Automations</strong> on the left hand side of the Sense Hub. Under here is a real treasure trove of components that can be used to build complex event driven automations. A lot of the components integrate with your Sense environment, for instance sending Qlik reports to recipients based on loading addresses from an data source. There are also a number of components to integrate with services outside of the Qlik environment, such as Teams, Slack, Hubspot etc. etc.. The automations that you create here don&#8217;t necessarily even need to have a Qlik component involved, for instance you could have an automation that posts to Teams when a new row appears in a Google Sheet. There is a whole host of no-code, drag and drop, opportunities to explore here. For now we are going to create a simple webhook that receives the GUID of an application and reloads it.</p>
<h3>Creating the Automation</h3>
<p>From the left hand menu in the <strong>Sense Hub</strong> select <strong>Automations</strong>, and then click the <strong>Create New Automation </strong>button at the top right. If you don&#8217;t see these options then you don&#8217;t have the permissions to create Automations, and will need to get this granted to you by an administrator via the Sense Console.</p>
<p>You will now see a large number of pre-canned templates for automations (which you can explore later), for now though select <strong>Create Without Template</strong> at the bottom left of the dialog. You will now be prompted to give your new webhook a name and description, and choose where to store it:</p>
<p><img decoding="async" class="aligncenter wp-image-1505921" src="https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Create-New-Automation.png" alt="Name and describe your WebHook" width="475" height="366" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Create-New-Automation-200x154.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Create-New-Automation-300x231.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Create-New-Automation-400x308.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Create-New-Automation-600x462.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Create-New-Automation.png 724w" sizes="(max-width: 475px) 100vw, 475px" /></p>
<p>You will be presented with an almost blank workspace, just with a single <strong>Start</strong> block in the middle. The properties for this block are on the right hand side. Change the <strong>Run Mode</strong> to <strong>Triggered</strong>. You will then see the code, including the execution key you will need to trigger the automation.</p>
<p><img decoding="async" class="aligncenter wp-image-1505923" src="https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Automation-Trigger-Settings.png" alt="Automation Trigger Settings" width="321" height="420" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Automation-Trigger-Settings-200x262.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Automation-Trigger-Settings-229x300.png 229w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Automation-Trigger-Settings-400x523.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Automation-Trigger-Settings.png 425w" sizes="(max-width: 321px) 100vw, 321px" /></p>
<p>Next you need to add an <strong>Input</strong> block, to receive the GUID for the app you wish to reload. On the left hand side search for <strong>Inputs</strong> then drag the inputs component immediately under your <strong>Start</strong> block, you will see a green dot when it is in place and when you drop the new block should be connected by a straight line. Set the <strong>Label</strong> to <strong>app</strong> and the <strong>Input Type</strong> to <strong>Data</strong>.</p>
<p><img decoding="async" class="aligncenter wp-image-1505925" src="https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Automation-Inputs.png" alt="Automation Inputs" width="267" height="358" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Automation-Inputs-200x267.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Automation-Inputs-224x300.png 224w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Automation-Inputs.png 353w" sizes="(max-width: 267px) 100vw, 267px" /></p>
<p>At this point you need to inject a value into the <strong>app</strong> parameter, so that it can be used in the next step. First you will need to save the automation using the <strong>Save</strong> button at the top of the page. Then, from the <strong>POST example </strong>on the <strong>Start </strong>block (pictured above), copy the text from <strong>https://</strong> through to the end of the execution token (in this case <strong>guV1</strong>). Paste this whole string into a new browser tab and make the following edits: add a <strong>?</strong> after the word execute, delete from there up to <strong>X-</strong>, replace the <strong>colon</strong> and <strong>space </strong>with an equals symbol, then add to the end of the URL <strong>&amp;app=x</strong>. So, given the example pictured above the complete URL would be (with the * characters replaced with your details):</p>
<p><strong>https://****.**.qlikcloud.com/api/v1/automations/****-****-****-****/actions/execute?X-Execution-Token=***********&amp;app=x</strong></p>
<p>Click enter to call the URL, and you will simply see <strong>[]</strong> returned in your browser. Leave that browser tab open (you will need it shortly) and return to the Automation editor.</p>
<p>The next bock you require is the one that actually triggers the reload. On the left hand side click on <strong>Qlik Cloud Services</strong> and search for the <strong>Do Reload</strong> component. Drag this under the <strong>Inputs </strong>component. In the properties panel drop down under the <strong>App Id </strong>field and select <strong>Inputs</strong> (this relates to the previous node) then click <strong>History </strong>and select <strong>app: x</strong> from under Inputs (this is what you passed in during the previous step). Set the <strong>Run Mode</strong> to be <strong>Start reload and continue</strong>.</p>
<p><img decoding="async" class="aligncenter wp-image-1505926" src="https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Automation-Do-Reload-Properties.png" alt="Automation Do Reload Properties" width="290" height="255" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Automation-Do-Reload-Properties-200x176.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Automation-Do-Reload-Properties-300x264.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Automation-Do-Reload-Properties-400x352.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2025/10/Automation-Do-Reload-Properties.png 453w" sizes="(max-width: 290px) 100vw, 290px" /></p>
<p>Finally you need to add an <strong>Output</strong> node, so search for this on the left hand panel and then drop it after the <strong>Do Reload</strong> node. In the <strong>Data to output</strong> properties, you should see that it has the <strong>Do Reload</strong> node as the output it will send as a result. If it does not, drop down here and select <strong>Output from Do Reload</strong> and then <strong>Do Reload</strong>.</p>
<p>That is the Automation completed, so click save up the top of the sheet to finish.</p>
<p>Now you will need the GUID of an application that you want to reload. The GUID can be found in the URL when you have an application open, you will find it between <strong>app/ </strong>and <strong>/overview </strong>or <strong>/state</strong>. It will look a bit like this: <strong>0e316df1-fd5c-4cd0-bac1-2f66a03b4c3d</strong>. Copy this to your clipboard and return to the tab where you called the webhook previously. Replace the <strong>x</strong> at the end of the URL with the GUID and return again. This time you should get some JSON returned, confirming that the reload has started. Check the details of the app that you have chosen to reload in the Hub and you should be able to see that a reload has started.</p>
<h3>Calling The Webhook</h3>
<p>As you have seen, you can call your new webhook simply by pasting it into the URL of a browser. It can also be bookmarked, for ease of use. You can create different bookmarks for each of the different apps you want to allow people to reload and most browsers will allow you to export bookmarks to give to someone else to import into their browser. The Sense hub now allows you to add links to the hub, so you can create links in there. Buttons in Sense allow you to call URLs, so that is somewhere else you can call the link.</p>
<p>The resultant webpage is a bit messy, so you might want to have a page that calls the webhook with javascript and parses the output and gives a friendlier results page, or perhaps just triggers a back action to take the user back to where they came from.</p>
<p>To call from a Qlik load script you will need a <a href="https://help.qlik.com/en-US/connectors/Subsystems/REST_connector_help/Content/Connectors_REST/Load-REST-data/Load-data.htm">REST connector</a> created which has the webhook as the URL. If you have a lot of apps you wish to reload in this way you will want to have a placeholder URL in your rest connection and then replace the URL in the script using a <strong>WITH CONNECTION </strong>statement. I describe how to do this in the blog post I referenced at the top of this article: <a href="https://www.quickintelligence.co.uk/ifttt-webhooks-qlik-cloud/">Using IFTTT and WebHooks To Send Data From Qlik Sense</a>.</p>
<p>Hopefully that gives you what you need to be kicking off reloads from various different events and in various different ways. If you have used similar techniques please feel free to share them in the comments below.</p>
<p>&nbsp;</p>
<p>The post <a href="https://www.quickintelligence.co.uk/start-a-qlik-sense-cloud-reload-from-a-webhook/">Start a Qlik Sense Cloud Reload from a Webhook</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.quickintelligence.co.uk/start-a-qlik-sense-cloud-reload-from-a-webhook/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1505920</post-id>	</item>
		<item>
		<title>Generating Test Data In Qlik Load Scripts</title>
		<link>https://www.quickintelligence.co.uk/generating-test-data-in-qlik-load-scripts/</link>
					<comments>https://www.quickintelligence.co.uk/generating-test-data-in-qlik-load-scripts/#respond</comments>
		
		<dc:creator><![CDATA[Steve Dark]]></dc:creator>
		<pubDate>Mon, 20 Nov 2023 10:31:48 +0000</pubDate>
				<category><![CDATA[Back To Basics]]></category>
		<category><![CDATA[Qlik Sense Tutorials]]></category>
		<category><![CDATA[Charting]]></category>
		<category><![CDATA[Correlation]]></category>
		<category><![CDATA[Stats]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.quickintelligence.co.uk/?p=1505866</guid>

					<description><![CDATA[<p>Sometimes you need to create test data to ensure that a Qlik function behaves the way you expect it should. Recently I had just that requirement to prove that the Correl function gave good results over semi-predictable data. This post shows how you can create data on the fly for these kind of purposes. Data  [...]</p>
<p>The post <a href="https://www.quickintelligence.co.uk/generating-test-data-in-qlik-load-scripts/">Generating Test Data In Qlik Load Scripts</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Sometimes you need to create test data to ensure that a Qlik function behaves the way you expect it should. Recently I had just that requirement to prove that the Correl function gave good results over semi-predictable data. This post shows how you can create data on the fly for these kind of purposes.</p>
<p><span id="more-1505866"></span></p>
<h2>Data Without a Source</h2>
<p>Typically a Qlik application will load its data from a data source, such as a database, API or flat file. Sometimes you just want to create something on the fly. The <strong>AUTOGENERATE</strong> function is a great way of doing this, and many of the applications on my <a href="https://www.quickintelligence.co.uk/examples/" target="_blank" rel="noopener">Qlik Examples</a> page use just this functionality. The function gives a specified number of rows of data that you can then work from. To create a table with a single field with values from 1 to 1,000:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">LOAD
    RowNo() as Value
AUTOGENERATE(1000);</code></pre>
<p>This may be useful in and of itself, but it is more likely you will need to do more. Read on to find out some of the things you can do.</p>
<h2>Well, That&#8217;s A Bit Random</h2>
<p>Often you will want to create some random values, and for this the <strong>rand()</strong> function is what you require. This function will return a number which falls somewhere between 0 and 1. Whilst at first this sounds a bit limited, with some very basic maths you can create many kinds of values.</p>
<p>So, to get a random integer between 0 and 999 you could do the following:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">LOAD
    floor(rand()*1000) as Value
AUTOGENERATE(1000);</code></pre>
<p>If you wanted to get a relatively random number of dimension values from a list you can multiply the random value by the number of values you have, round up to the nearest integer and then use a <strong>pick()</strong> function to choose which dimension value to pick:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">LOAD
    pick(ceil(rand()*5),'Ben','Ian','Tom','Paul','Olly') as Person
AUTOGENERATE(1000);</code></pre>
<p>Note with this approach though you will get roughly the same number of rows for each of the values, due to how random numbers work. If you want to have less regular number of rows you will need to introduce some bias.</p>
<p>If you want to generate random codes that look like they could be real (but are not) you can use the fact that the <strong>chr()</strong> function picks an ascii character based on a number. To get a code that looks like ABC123 you would have:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">LOAD
    chr(65+floor(rand()*26))
        & chr(65+floor(rand()*26))
        & chr(65+floor(rand()*26))
        & num(ceil(rand()*999), '000') as PersonID
AUTOGENERATE(1000);</code></pre>
<p>Given the number of possible values that this could generate you would most likely get all unique values. If you would prefer to guarantee that there are no duplicates you could use <strong>rowno()</strong> instead of <strong>rand()</strong>. If you wanted to cause more duplicates you could reduce the number of characters and the multipliers on each of the random values, perhaps reducing the letters to A to D and the digits to all be multiples of 9:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">LOAD
    chr(65+floor(rand()*4))
        & chr(65+floor(rand()*4))
        & num(ceil(rand()*99)*9, '000') as DupedID
AUTOGENERATE(1000);</code></pre>
<p>If you want to have data shown on a line chart you can generate dates, using the fact that dates are just numbers under the bonnet and we can therefore do maths on them. Again, if you want one row per date then use the <strong>rowno()</strong> function, or if you want more randomness around the rows per day use <strong>rand()</strong>:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">LOAD
    date(today()-(rowno()-1), 'DD MMM YYYY') as Date,
    date(today()-floor(rand()*90), 'DD MMM YYYY') as [Date Rolling 3m]
AUTOGENERATE(1000);</code></pre>
<p>Creating dates in this way has been particularly useful in some of the demo apps I&#8217;ve created, as a simple reload will make the demo look fresh and current as all dates are in a period leading up to the current date.</p>
<p>That&#8217;s just a few examples of generating test data using <strong>AUTOGENERATE</strong>, but I am sure you can think of many more.</p>
<h2>But Does It All Correlate?</h2>
<p>I mentioned at the top that I had a recent requirement to test the <strong>correl()</strong> function, and generated some data to do this. For those who have note come across the statement before, it returns the aggregated correlation coefficient for two data sets. Or put into English, a value is returned which is close to 1 if there is a very strong positive correlation, close to -1 if there is a strong negative correlation and close to zero if there is very little correlation between two sets of values.</p>
<p>The function is called like this:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">correl(aggr(sum(X), Dim), aggr(sum(Y1), Dim))</code></pre>
<p>This is where <strong>Dim</strong> is a dimension value in the data and the two <strong>aggr</strong> statements create two datasets with a row for each dimension value. The <strong>sum(X)</strong> and <strong>sum(Y)</strong> expressions would usually be more complex calculations, but in this case it is simply the numbers generated in the load script.</p>
<p><img decoding="async" src="https://www.quickintelligence.co.uk/wp-content/uploads/2023/11/Correl-X-Y.jpg" alt="Correlation chart X=Y" width="270" height="257" class="alignright size-full wp-image-1505869" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2023/11/Correl-X-Y-200x190.jpg 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/11/Correl-X-Y.jpg 270w" sizes="(max-width: 270px) 100vw, 270px" />The load script to make this expression work is as follows:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">LOAD
    'Row ' & num(RowNo(), '#,##0') as Dim,
    RowNo() as X,
    RowNo() as Y1
AUTOGENERATE(1000);</code></pre>
<p>Because we are using the row number for both the <strong>X</strong> and <strong>Y1</strong> values there is an absolute positive correlation and the function returns 1, as it should.</p>
<p><img decoding="async" src="https://www.quickintelligence.co.uk/wp-content/uploads/2023/11/Correl-X-Y-1.jpg" alt="Correlation chart inverse" width="271" height="257" class="alignright size-full wp-image-1505873" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2023/11/Correl-X-Y-1-200x190.jpg 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/11/Correl-X-Y-1.jpg 271w" sizes="(max-width: 271px) 100vw, 271px" />For all subsequent tests we keep the Dim dimension and the X value, which always gives us a point along the bottom of the chart. For a negative correlation the value of Y can be calculated as:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">1000 - RowNo() as Y2</code></pre>
<p>So now when X is 0 Y is 1000 and vice versa. This is an absolute negative correlation, and the correl function returns -1, again as it should.</p>
<p>The rest of the values for Y which I tested for where as follows:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">Rand() * 1000 as Y3</code></pre>
<p>A totally random value, which gives a correlation coefficient that is very close to zero and a plot that is full of randomly placed dots.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">RowNo() * Rand() as Y4</code></pre>
<p>A random value between 0 and 1 multiplied by the X value, so that the Y value is random, but never greater than Y. This gives a correlation coefficient that is around 0.5 and a chart where the bottom right half is filled. This could be inverted, but I did not try that value.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">(RowNo() * (Rand()-0.5)) + 500</code></pre>
<p>A value that deviates from the centre of the chart on the Y axis by a random number that is plus or minus half of the value of Y. As the values fall above and below the line equally the correlation is very close to zero.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">RowNo() + ((Rand()-0.5)*(RowNo()/1)) as Y6</code></pre>
<p>This value is similar to the X=Y chart we started with, but with a random deviation from the line in either direction, up to half of the Y value. The divide by 1 is left in there as I was experimenting with having the deviation greater or lesser by dividing the row number. Correlation coefficient is approaching 1, but is not there.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">500 + ((rand()*10)-5) as Y7</code></pre>
<p>This value has a similar Y value for every value of X. I started off having it exactly the same for each X value, but the correl function requires some variance in the number or the spread will be zero causing a divide by zero and no correlation coefficient number. A random deviation of up to 5 in either direction provides this difference, but that deviation is small enough that the correlation coefficient is very close to zero.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">500 + ((rand()*10)-5) as X2</code></pre>
<p>The final expression is a bit different to all the others, as I wanted values from 1 to 1000 for all Y values in order (I use Y1 from above for this) and then have a calculation for the X value that is close to the same value, but off by a small margin. You will note the expression for X2 is identical to Y7, and I could have used the same field in the correl function, but it felt wrong to have two values labeled Y in the chart.</p>
<p>The resultant scatter charts and correlation coefficients for all of the derived values above can be seen in this screenshot (click to expand).</p>
<p><a href="https://www.quickintelligence.co.uk/wp-content/uploads/2023/11/Correl-Function-Screenshot.jpg"><img decoding="async" src="https://www.quickintelligence.co.uk/wp-content/uploads/2023/11/Correl-Function-Screenshot.jpg" alt="Qlik Sense Screen Showing Correl Function" width="1200" height="630" class="aligncenter size-full wp-image-1505875" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2023/11/Correl-Function-Screenshot-200x105.jpg 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/11/Correl-Function-Screenshot-300x158.jpg 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/11/Correl-Function-Screenshot-400x210.jpg 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/11/Correl-Function-Screenshot-600x315.jpg 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/11/Correl-Function-Screenshot-768x403.jpg 768w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/11/Correl-Function-Screenshot-800x420.jpg 800w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/11/Correl-Function-Screenshot-1024x538.jpg 1024w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/11/Correl-Function-Screenshot.jpg 1200w" sizes="(max-width: 1200px) 100vw, 1200px" /></a></p>
<p>The entire load script for the Correl application looks like this:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">LOAD
    'Row ' & num(RowNo(), '#,##0') as Dim,
    RowNo() as X,
    RowNo() as Y1,
    1000 - RowNo() as Y2,
    Rand() * 1000 as Y3,
    RowNo() * Rand() as Y4,
    (RowNo() * (Rand()-0.5)) + 500 as Y5,
    RowNo() + ((Rand()-0.5)*(RowNo()/1)) as Y6,
    500 + ((rand()*10)-5) as Y7,
    500 + ((rand()*10)-5) as X2
AUTOGENERATE(1000);</code></pre>
<p>And the entire application can be downloaded from Qlik Community here:<br />
<a href="https://community.qlik.com/t5/Qlik-Sense-Documents/Qlik-Sense-App-Create-Test-Data-For-Correl-Function-Using/ta-p/2139164" rel="noopener" target="_blank">https://community.qlik.com/t5/Qlik-Sense-Documents/Qlik-Sense-App-Create-Test-Data-For-Correl-Function-Using/ta-p/2139164</a></p>
<p>Hopefully that has given you some inspiration what you can do when you need to generate some test data. I would be very interested to hear of other thoughts you might have on the topic, so please do use the comments box below to let me know.</p>
<p>The post <a href="https://www.quickintelligence.co.uk/generating-test-data-in-qlik-load-scripts/">Generating Test Data In Qlik Load Scripts</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.quickintelligence.co.uk/generating-test-data-in-qlik-load-scripts/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1505866</post-id>	</item>
		<item>
		<title>Change to Qlik SaaS Licences API Endpoint</title>
		<link>https://www.quickintelligence.co.uk/change-to-qlik-saas-licences-api-endpoint/</link>
					<comments>https://www.quickintelligence.co.uk/change-to-qlik-saas-licences-api-endpoint/#comments</comments>
		
		<dc:creator><![CDATA[Steve Dark]]></dc:creator>
		<pubDate>Thu, 14 Sep 2023 09:20:46 +0000</pubDate>
				<category><![CDATA[Instant App]]></category>
		<category><![CDATA[Load Script]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[licences]]></category>
		<guid isPermaLink="false">https://www.quickintelligence.co.uk/?p=1505855</guid>

					<description><![CDATA[<p>There is a massive amount of information that can be loaded directly into your Sense apps from the Qlik Cloud API. If you have been loading from the Licences endpoint though you may have noticed a change to the response since yesterday. The userId and name fields in the response have now been replaced with  [...]</p>
<p>The post <a href="https://www.quickintelligence.co.uk/change-to-qlik-saas-licences-api-endpoint/">Change to Qlik SaaS Licences API Endpoint</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>There is a massive amount of information that can be loaded directly into your Sense apps from the Qlik Cloud API. If you have been loading from the Licences endpoint though you may have noticed a change to the response since yesterday. The userId and name fields in the response have now been replaced with subject, potentially breaking your script.<span id="more-1505855"></span></p>
<h2>Background to Using the API</h2>
<p>The Qlik SaaS API can be used for retrieving information regarding your SaaS environment and also for making changes in your environment, such as allocating permissions. The endpoints available to end-users are the same endpoints that Qlik use to build the product. You can interact with these via REST connectors, Qlik Automations and third party tools; such as Göran Sander&#8217;s <a href="https://ptarmiganlabs.com/ctrl-q-low-code-tools-for-qlik-sense-on-po-cloud/" target="_blank" rel="noopener">Ctrl+Q</a>. I have blogged previously on using these APIs in the Sense load script, and describe the process of setting up and calling them in my post on <a href="https://www.quickintelligence.co.uk/sense-capacity-licence-notify/">Monitoring and Notifying Sense Capacity Licence Usage in Qlik Cloud</a>. If you are not yet using APIs in your own applications then you might want to start there.</p>
<h2>Required Changes to Fix Broken Loads</h2>
<p><img decoding="async" class="alignright size-medium wp-image-1505856" src="https://www.quickintelligence.co.uk/wp-content/uploads/2023/09/Qlik-API-Example-300x189.png" alt="Qlik API Example" width="300" height="189" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2023/09/Qlik-API-Example-200x126.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/09/Qlik-API-Example-300x189.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/09/Qlik-API-Example-320x202.png 320w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/09/Qlik-API-Example-400x252.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/09/Qlik-API-Example-600x379.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/09/Qlik-API-Example-700x441.png 700w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/09/Qlik-API-Example.png 748w" sizes="(max-width: 300px) 100vw, 300px" />Quick Intelligence provide a free download of what we call the <a href="https://www.quickintelligence.co.uk/instant-qlik-sense-app/">Instant Qlik Sense Application</a>. This is a Sense application template, which ships with a number of example load scripts and configuration files. Two of these example scripts are for monitoring Qlik SaaS usage and sessions. Both of these scripts have been broken by the change to the API.</p>
<p>Fortunately the change to the API endpoint is relatively minor and the fix simple. The revised documentation for the endpoint can be found here <a href="https://qlik.dev/apis/rest/licenses" target="_blank" rel="noopener">https://qlik.dev/apis/rest/licenses</a>.</p>
<p>If you wish to modify the script in a an app you already have running you simply need to find the Licences part of the script and change references to <strong>userId</strong> and <strong>UserId</strong> to <strong>subject</strong> and <strong>Subject</strong> respectively, and then remove references to <strong>name</strong> and <strong>User Name</strong>.</p>
<p>There is a further gotcha that I have spotted whilst changing this over though, and that is that the case of the <strong>subject</strong> field on the <strong>Users</strong> endpoint does not always match the case of the same field on the <strong>Licences</strong> endpoint. You should therefore add an <strong>upper</strong> statement around <strong>Subject</strong> in the creation of the mapping table and where it is used. If you are using the endpoints and associating the tables rather than mapping you will need to match the case in the tables themselves.</p>
<p>If you use these endpoints in your own scripts, or have downloaded an application that uses them, then you are likely going to have to make similar changes to that load script.</p>
<p>If you don&#8217;t yet use the <a href="https://www.quickintelligence.co.uk/instant-qlik-sense-app/">Instant Qlik Sense Application</a> then you can find out more about it, and download it from here:</p>
<p><a href="https://www.quickintelligence.co.uk/instant-qlik-sense-app/">https://www.quickintelligence.co.uk/instant-qlik-sense-app/</a></p>
<p>If you would just like the script for using the Sessions or Usage endpoints of the API these can be downloaded here:</p>
<p><a href="https://www.quickintelligence.co.uk/SaaSUsage.txt">https://www.quickintelligence.co.uk/SaaSUsage.txt</a><br />
<a href="https://www.quickintelligence.co.uk/SaaSSessions.txt">https://www.quickintelligence.co.uk/SaaSSessions.txt</a></p>
<p>With the SaaS usage script and configuration file, Sense users are coloured by their licence types and if you have a mix of both analyser and capacity licencing you can ensure that the users who use the system the most are the ones who are holding analyser licences whilst occasional users can use capacity.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505857" src="https://www.quickintelligence.co.uk/wp-content/uploads/2023/09/Duration-Minutes-By-User.png" alt="Bar chart showing usage by user" width="450" height="206" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2023/09/Duration-Minutes-By-User-200x92.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/09/Duration-Minutes-By-User-300x137.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/09/Duration-Minutes-By-User-400x183.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/09/Duration-Minutes-By-User.png 450w" sizes="(max-width: 450px) 100vw, 450px" /></p>
<p>&nbsp;</p>
<p>If you have any questions or comments on using the API or the <a href="https://www.quickintelligence.co.uk/instant-qlik-sense-app/">Instant Qlik Sense Application</a> then please use the comments section below.</p>
<p>The post <a href="https://www.quickintelligence.co.uk/change-to-qlik-saas-licences-api-endpoint/">Change to Qlik SaaS Licences API Endpoint</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.quickintelligence.co.uk/change-to-qlik-saas-licences-api-endpoint/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1505855</post-id>	</item>
		<item>
		<title>Compare Rolling Twelve Month Period in Qlik</title>
		<link>https://www.quickintelligence.co.uk/compare-rolling-twelve-month-period-in-qlik/</link>
					<comments>https://www.quickintelligence.co.uk/compare-rolling-twelve-month-period-in-qlik/#comments</comments>
		
		<dc:creator><![CDATA[Steve Dark]]></dc:creator>
		<pubDate>Fri, 05 May 2023 11:12:11 +0000</pubDate>
				<category><![CDATA[Load Script]]></category>
		<category><![CDATA[Qlik Sense Tutorials]]></category>
		<category><![CDATA[Dates]]></category>
		<category><![CDATA[Prior Period]]></category>
		<guid isPermaLink="false">https://www.quickintelligence.co.uk/?p=1505817</guid>

					<description><![CDATA[<p>Creating a line chart in Qlik showing a year on year comparison is very easy, using the Month and Year functions to create two dimensions. What if you want to show a rolling twelve month comparison though? This is not quite so obvious, but this post makes it just as easy. The Challenge The question  [...]</p>
<p>The post <a href="https://www.quickintelligence.co.uk/compare-rolling-twelve-month-period-in-qlik/">Compare Rolling Twelve Month Period in Qlik</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Creating a line chart in Qlik showing a year on year comparison is very easy, using the Month and Year functions to create two dimensions. What if you want to show a rolling twelve month comparison though? This is not quite so obvious, but this post makes it just as easy.</p>
<p><span id="more-1505817"></span></p>
<h2>The Challenge</h2>
<p>The question was posed on Qlik Community how to overlay two 12 month measures in one chart. Using set analysis it is straight forward to have two measures which cover the correct date ranges, but when the Month dimension is used it will sort by calendar month, rather in the order required for rolling periods. You can see the question and my response in <a href="https://community.qlik.com/t5/New-to-Qlik-Sense/Overlay-2-rolling-12-month-measures-in-one-chart/m-p/2065557" target="_blank" rel="noopener">this post</a>.</p>
<p>The response uses a technique I have used a number of times before but it occurred to me that I have not documented it on the blog, so here it goes.</p>
<h2>Creating Rolling Month and Year Dimensions</h2>
<p>This code can either sit in your master calendar code, should you use one, or you can place it directly in the load statement from source data. Typically I will go for the latter approach.</p>
<p><img decoding="async" class="alignright size-medium wp-image-1505826" src="https://www.quickintelligence.co.uk/wp-content/uploads/2023/05/Rolling-Twelve-Month-Gauge-300x190.png" alt="Qlik Rolling Twelve Month Compare Gauge" width="300" height="190" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2023/05/Rolling-Twelve-Month-Gauge-200x126.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/05/Rolling-Twelve-Month-Gauge-300x190.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/05/Rolling-Twelve-Month-Gauge-320x202.png 320w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/05/Rolling-Twelve-Month-Gauge-400x253.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/05/Rolling-Twelve-Month-Gauge.png 467w" sizes="(max-width: 300px) 100vw, 300px" />The first thing that we need to do in the load script is to create a sequential integer for each month. This then allows us to work out the number of calendar months between any two dates. This technique has many more uses than just rolling twelve month analysis and is an incredibly useful dimension to have in your data model.</p>
<p>If we do <strong>(Year(Date)*100)+Month(Date) </strong>we will get a sequential integer value within a year (e.g. as at now it will give <strong>202305</strong>), but the deltas break when you go across a year (e.g. comparing <strong>202212</strong> to <strong>202301</strong>). In order to fix this we can just multiply the year by 12 and add the month. So, again taking May 23 as an example you will get <strong>24,281</strong>. This is obviously not at all useful as a human readable number (just as telling someone that the date today is <strong>45051</strong> is only useful if they are a machine), but it means that the numbers for Dec 22 (<strong>24,276</strong>) and Jan 23 (<strong>24,277</strong>) are now just one integer apart.</p>
<p>In the load script we can put this code in to create a new field called <strong>MonthNo</strong> like this:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">(Year(Date) * 12) + Month(Date) as MonthNo,</code></pre>
<p>Now we have that value we need to work out how many months back any given month is from today. The code that we used on the <strong>Date</strong> field can also be done on the <strong>today()</strong> function, giving a comparable figure for the current date. Using a <strong><a href="https://www.quickintelligence.co.uk/preceding-load-qlikview/" target="_blank" rel="noopener">preceding load</a></strong>, we can compare that to the <strong>MonthNo</strong> field to get a value for <strong>Months Back</strong>, like this:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">(Year(today()) * 12) + Month(Today()) - MonthNo as [Months Back]</code></pre>
<p>This new field in itself may be useful in your charts and filters within Sense, for instance it could make your <strong><a href="https://www.quickintelligence.co.uk/prior-period-comparison/" target="_blank" rel="noopener">set analysis</a></strong> for a chart showing the last twelve months much easier as you do not need to deal with date formats in the set code.</p>
<p>Jumping up another level of preceding load we can now use the <strong>Months Back</strong> value to create the <strong>Rolling Month</strong> and <strong>Rolling Year</strong> values.</p>
<p>The <strong>Month</strong> function gives us a dual data-typed value with the three letter month name and the integer order for the month from 1 to 12. The text part of that dual datatype is great for us but the number does not give us what we want.</p>
<p>We can use the <strong>Dual</strong> function though to build our own dual data-typed value with the correct sequential number. Using the output of the Month function as the first parameter of the <strong>Dual</strong> statement will only take the text part of that value. The correct sequential number can be calculated by working out how many months back the start of the year was and then taking away the months back for the date in question.</p>
<p>The whole of that code looks like this:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">Dual(Month(Month), (Floor([Months Back]/12)*12)-[Months Back]) as [Rolling Month],</code></pre>
<p>We can get the number of rolling years back from our <strong>Months Back</strong> value by taking the integer part of the number of months back divided by 12. In order to turn that into text to show as a dimension we want to suffix it with the text &#8220;Years Back&#8221;. As having &#8220;0 Years Back&#8221; looks a bit naff, we need to have anything in the past 12 months showing as &#8220;Current Year&#8221;. Having that text means that sorting on the field breaks (as it would if you have more than a decade of data), so we need to use the <strong>dual</strong> function again.</p>
<p>Putting all of that together gives us this statement:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">Dual(if([Months Back] &lt; 12, 'Current Year',
    Floor([Months Back]/12) &amp; ' Years Back'),
    Floor([Months Back]/12)) as [Rolling Year]</code></pre>
<p>We then have the two dimensions that we can use in a line chart:</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505822" src="https://www.quickintelligence.co.uk/wp-content/uploads/2023/05/Rolling-Twelve-Month-Line-Chart.png" alt="Line chart showing rolling twelve months" width="926" height="336" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2023/05/Rolling-Twelve-Month-Line-Chart-200x73.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/05/Rolling-Twelve-Month-Line-Chart-300x109.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/05/Rolling-Twelve-Month-Line-Chart-400x145.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/05/Rolling-Twelve-Month-Line-Chart-600x218.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/05/Rolling-Twelve-Month-Line-Chart-768x279.png 768w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/05/Rolling-Twelve-Month-Line-Chart-800x290.png 800w, https://www.quickintelligence.co.uk/wp-content/uploads/2023/05/Rolling-Twelve-Month-Line-Chart.png 926w" sizes="(max-width: 926px) 100vw, 926px" /></p>
<h2>Putting It All Together</h2>
<p>This code generates a whole bunch of dates and then applies the date code described above in a resident load. You can copy and paste this to a new app and see the code working in isolation, or your can take parts of it to apply to your own data.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">tmpDate:
LOAD
    Date(today()-RowNo(), 'DD MMM YYYY') as Date
AUTOGENERATE(2000);

Dates:
LOAD
    *,
    Dual(Month(Month),
        (Floor([Months Back]/12)*12)-[Months Back]) as [Rolling Month],
    Dual(if([Months Back] &lt; 12, 'Current Year',
        Floor([Months Back]/12) &amp; ' Years Back'),
        Floor([Months Back]/12)) as [Rolling Year]
    ;
LOAD
    *,
    (Year(today()) * 12) + Month(Today()) - MonthNo as [Months Back]
    ;
LOAD
    Rand() * 1000 as Value,
    Date,
    Date(MonthStart(Date), 'MMM YYYY') as Month,
    (Year(Date) * 12) + Month(Date) as MonthNo,
    Month(Date) as [Month Name]
RESIDENT tmpDate
;

DROP TABLE tmpDate;</code></pre>
<p>Something else you might want to deal with when looking at rolling months is a <strong><a href="https://www.quickintelligence.co.uk/qlik-run-rate/" rel="noopener" target="_blank">run rate</a></strong> value for the current month, which takes into account how far through the month we are and what the value will be if extrapolated to the number of days in the month. I have covered this in a <a href="https://www.quickintelligence.co.uk/qlik-run-rate/" rel="noopener" target="_blank">previous post</a>.</p>
<p>Not only does this code give you dimensions that you can use in your charts, the same dimensions can be used in set analysis also. To create the variance to prior rolling twelve months gauge at the top of the chart you can now just use this code:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeexp">(Sum({&lt;[Rolling Year]*={'1 Years Back'}&gt;}Value) /
Sum({&lt;[Rolling Year]*={'Current Year'}&gt;}Value)) -1</code></pre>
<p>An example QVF file including this code and some example charts can be downloaded from the <a href="https://community.qlik.com/t5/New-to-Qlik-Sense/Overlay-2-rolling-12-month-measures-in-one-chart/m-p/2065557" target="_blank" rel="noopener">Qlik Community</a> post.</p>
<p>I would be very interested to hear from you on this technique and whether you have used similar or can suggest other ways it could be used. Please use the comments below if you would like to add your thoughts.</p>
<p>The post <a href="https://www.quickintelligence.co.uk/compare-rolling-twelve-month-period-in-qlik/">Compare Rolling Twelve Month Period in Qlik</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.quickintelligence.co.uk/compare-rolling-twelve-month-period-in-qlik/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1505817</post-id>	</item>
		<item>
		<title>Instant Qlik Sense Application Changes in 2022</title>
		<link>https://www.quickintelligence.co.uk/instant-qlik-sense-application-changes-in-2022/</link>
					<comments>https://www.quickintelligence.co.uk/instant-qlik-sense-application-changes-in-2022/#respond</comments>
		
		<dc:creator><![CDATA[Steve Dark]]></dc:creator>
		<pubDate>Tue, 20 Dec 2022 12:04:35 +0000</pubDate>
				<category><![CDATA[Instant App]]></category>
		<category><![CDATA[Qlik Sense]]></category>
		<category><![CDATA[Features]]></category>
		<category><![CDATA[Instant Sense App]]></category>
		<category><![CDATA[Sense]]></category>
		<guid isPermaLink="false">https://www.quickintelligence.co.uk/?p=1505608</guid>

					<description><![CDATA[<p>A few years ago I created the Instant Sense Application, a template application with twelve sheets of analysis, which allows me to load in any data source and roll it out at a client. To enable any Sense user to be able to do the same I made the application free to download from our  [...]</p>
<p>The post <a href="https://www.quickintelligence.co.uk/instant-qlik-sense-application-changes-in-2022/">Instant Qlik Sense Application Changes in 2022</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>A few years ago I created the Instant Sense Application, a template application with twelve sheets of analysis, which allows me to load in any data source and roll it out at a client. To enable any Sense user to be able to do the same I made the application free to <a href="https://www.quickintelligence.co.uk/instant-qlik-sense-app/">download from our website</a>. The application evolves as new features are required and when Qlik brings in new features to Sense itself. This posts rolls up some of the changes in the past year or so.<br />
<span id="more-1505608"></span></p>
<h3>Instant Sense Application Live Demos</h3>
<p><a href="https://www.quickintelligence.co.uk/wp-content/uploads/2022/05/Instant-Qlik-Sense-App-AskQV.gif"><img decoding="async" class="alignright size-medium wp-image-1505516" src="https://www.quickintelligence.co.uk/wp-content/uploads/2022/05/Instant-Qlik-Sense-App-AskQV-300x153.gif" alt="Screenshots of AskQV Instant Sense Demo" width="300" height="153" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2022/05/Instant-Qlik-Sense-App-AskQV-200x102.gif 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/05/Instant-Qlik-Sense-App-AskQV-300x153.gif 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/05/Instant-Qlik-Sense-App-AskQV-400x204.gif 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/05/Instant-Qlik-Sense-App-AskQV-600x306.gif 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/05/Instant-Qlik-Sense-App-AskQV-768x391.gif 768w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/05/Instant-Qlik-Sense-App-AskQV-800x407.gif 800w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/05/Instant-Qlik-Sense-App-AskQV-1024x521.gif 1024w" sizes="(max-width: 300px) 100vw, 300px" /></a>It is sometimes to hard to describe what the Instant Sense Application is or how it functions. The simplest way to get your head around it is to see it working, with data that means something. In order to achieve that I set up auto-authentication on a SaaS tenant to allow anonymous usage of some ISA demos.</p>
<p>My thanks go to <a href="https://www.linkedin.com/in/danielpilla/" target="_blank" rel="noopener">Daniel Pilla</a> at Qlik who helped me get this working. The instructions to set this up can be found on Qlik Dev here: <a href="https://qlik.dev/embed/embed-quick-starts/embedding-with-anonymous-access-and-qlik-cloud" target="_blank" rel="noopener">https://qlik.dev/embed/embed-quick-starts/embedding-with-anonymous-access-and-qlik-cloud</a>. Whilst there is no equivalent to Tableau Public from Qlik, setting this up on a SaaS Tenant with a Capacity licence is the best way to go.</p>
<p>This has allowed me to post live demos to my <a href="https://www.linkedin.com/in/stevedark/" target="_blank" rel="noopener">socials</a>, and to the <a href="https://www.quickintelligence.co.uk/instant-qlik-sense-app/" target="_blank" rel="noopener">Instant Sense App</a> landing page. There is also now a live view of Qlik Blog Posts over on the <a href="https://www.askqv.com/" target="_blank" rel="noopener">AskQV</a> site.</p>
<h3>Download Without Signing Up for Updates</h3>
<p>When the Instant Sense Application was first released it was a requirement that users signed up with a valid email address and confirmed that address. I noticed that a lot of people were hitting the ISA page and then not giving their details. Fair enough, I might well do the same. For that reason, we removed the requirement to sign up to download the app. If you would like to hear from Quick Intelligence you can still sign up for our newsletter, but if you would prefer just to download the app you can do so by <a href="https://www.quickintelligence.co.uk/RGZ8yBveS6dr/InstantSenseApp.zip" target="_blank" rel="noopener">clicking here</a>.</p>
<p>To me this application is more important as a way to aid Qlik Sense adoption and to make it much quicker and easier to get data, and insights, to users than it is as a promotional tool for Quick Intelligence.</p>
<p>Please take the application and do something great with it! If you do find it saves you days of effort building applications it would be great if you could like, share, comment and all those good things on our social posts. I would love to hear what you are doing with the app.</p>
<h3>New Example Scripts and MetaData</h3>
<p>The Instant Sense Application ships with a number of example scripts and metadata files, so applications over these data can be quickly spun up and used in your own environment. Pretty much all of these have been tweaked to make use of the new features (more on those below), some also have new expressions and dimensions. As well as this new examples are being added to the download.</p>
<p>Pretty much from the first release, there have been session monitors for both Sense Client Managed and for Sense SaaS, sadly the SaaS one was limited by the API that was being called and didn&#8217;t show session duration.</p>
<p>Since that original SaaS example script was created, Qlik have exposed a new API endpoint which shows licence <a href="https://qlik.dev/apis/rest/licenses/#%23%2Fentries%2Fv1%2Flicenses%2Fconsumption-get" target="_blank" rel="noopener">consumption</a>, allowing a much more detailed view of who is consuming which licences. By using this script Sense SaaS administrators can get a good view on who should be holding a named licence and who should be consuming capacity, based on their recent activity. The currently held licence type is denoted by the colour. The client-managed Session monitor has been expanded to better facilitate this also:</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505610" src="https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/SaaS-Usage-Colour-Bars.png" alt="Charts from the Instant Sense Application SaaS Sessions Script" width="660" height="154" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/SaaS-Usage-Colour-Bars-200x47.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/SaaS-Usage-Colour-Bars-300x70.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/SaaS-Usage-Colour-Bars-400x93.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/SaaS-Usage-Colour-Bars-600x140.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/SaaS-Usage-Colour-Bars.png 660w" sizes="(max-width: 660px) 100vw, 660px" /></p>
<p>Another new script file that was added this year is for profiling libraries of QVD files, by <a href="https://www.quickintelligence.co.uk/read-meta-data-qlikview-qvd/" target="_blank" rel="noopener">reading the meta-data from the QVD header</a>. It gives a count of QVDs and stats around the size and ages of those QVD files. This app can help you identify redundant files in your environment and warn when the size of files is increasing. Any one who has a QVD layer in their environment (and that should be everyone) can make use of this script.</p>
<p>I&#8217;m looking at adding more example scripts to the download in time, both Qlik related ones and other non-related data sources. Watch this space.</p>
<h3>New Application Features</h3>
<p>There have been a number of tweaks made to the application over the year, some of the more interesting and useful ones are listed here.</p>
<p>The first I am going to mention you have already seen above. All of the charts (except the KPI text, annoyingly) now have a colour expression on them which takes <a href="https://www.quickintelligence.co.uk/variables-parameters-load-script/" target="_blank" rel="noopener">parameters</a> that define the chart type, dimension number and measure number.</p>
<p><img decoding="async" class="alignright size-full wp-image-1505613" src="https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/Colour-Expression.png" alt="Bar chart with colours from an expression" width="390" height="195" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/Colour-Expression-200x100.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/Colour-Expression-300x150.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/Colour-Expression.png 390w" sizes="(max-width: 390px) 100vw, 390px" />By modifying the expression in that variable dynamic colours can be applied throughout applications. These colours can be based on the dimension, expression, chart type or even be derived from values in the data, as shown here. Documentation is provided in the download showing various options for applying colours.</p>
<p>To further facilitate colours, and to allow the adding of bespoke functionality to your apps, there is now a Variables sheet in the metadata file. This can be used to inject variables into the app at load time. You could create all of your measures as variables, should you want.</p>
<p>The button functionality within Sense has improved, so there are a number of buttons to help with UI in the Instant Sense Application now. The Scatter chart has a button to toggle which expression is shown on the X and Y axis and the Top 20 trend has buttons so that the number of lines shown can be increased or decreased.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505616" src="https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/Top-N-Buttons.png" alt="Buttons to add or remove lines from chart." width="212" height="47" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/Top-N-Buttons-200x44.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/Top-N-Buttons.png 212w" sizes="(max-width: 212px) 100vw, 212px" /></p>
<p>Similar buttons appear on some of the new sheets straight out of the gate. There is also a button (which is a bit work-in-progress) to link to Google Maps from the Map sheet.</p>
<p>The ability to use Google Spreadsheets for the meta-data has been added, so that your online application can read its settings from an online data source, taking away the step of having to upload the configuration to Cloud after every change. Using Office 365 for this also is on the to-do list.</p>
<p>The map sheet now hides itself if you don&#8217;t have any geographical dimensions defined in your meta data. I&#8217;ve also tweaked some of the settings on the map, so that when you have only one point selected it doesn&#8217;t zoom to a point that you can&#8217;t see any context. You might want to adjust these settings for your own purposes, but I believe the defaults are better now.</p>
<p>Whilst it is best practice to use Master Dimensions for everything, I have decided to strip the Master Dimension out of the <a href="https://www.quickintelligence.co.uk/qlik-sense-data-profiler/" target="_blank" rel="noopener">Sense Profiler</a> sheet of the application. The reason for this is that this sheet is a useful addition for <strong>any</strong> Sense application, and now it can be copied and pasted into other apps without any faff. The sheet gives you a list of all tables and fields in a data model and then shows a chart of the number of occurrences of each value in the selected field.</p>
<h3>New Sheets And Chart Types</h3>
<p>The most recent addition to the Instant Sense Application is the Dual Map sheet. This will appear if you have two or more location type dimensions in your dataset. The first selected dimension shows on the left and the second on the right. This can be used to show different levels of granularity within location data, as shown here, or to show to and from locations for shipping or travel analysis.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505617" src="https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/Two-Dimension-Maps.png" alt="Instant Sense Dual Dimension Maps" width="660" height="290" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/Two-Dimension-Maps-200x88.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/Two-Dimension-Maps-300x132.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/Two-Dimension-Maps-400x176.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/Two-Dimension-Maps-600x264.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/Two-Dimension-Maps.png 660w" sizes="(max-width: 660px) 100vw, 660px" /></p>
<p>There have been a few chart types that have been absent from the application, until now, as they only work with expressions that accumulate to a total. A new column has been added to the Expressions sheet of the meta-data that defines which expressions are part-to-whole. If you have one or more of these in your data then the new sheets appear, giving you pie charts (sorry), a tree map and a Sankey chart. All of these work the same way as the existing sheets, with the ability to pick dimensions and any part-to-whole expression.</p>
<p><a href="https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/New-Chart-Types.png"><img decoding="async" class="aligncenter size-full wp-image-1505618" src="https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/New-Chart-Types.png" alt="New chart types in the Instant Sense Application" width="1402" height="871" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/New-Chart-Types-200x124.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/New-Chart-Types-300x186.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/New-Chart-Types-400x249.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/New-Chart-Types-600x373.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/New-Chart-Types-768x477.png 768w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/New-Chart-Types-800x497.png 800w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/New-Chart-Types-1024x636.png 1024w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/New-Chart-Types-1200x746.png 1200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/12/New-Chart-Types.png 1402w" sizes="(max-width: 1402px) 100vw, 1402px" /></a></p>
<p>Both the Sankey and the Tree Map have the ability to toggle which is the primary and secondary dimension, which gives much flexibility in how things are shown.</p>
<h3>Look To The Future Now, It&#8217;s Only Just Begun</h3>
<p>Whilst extending and expanding the Instant Sense Application isn&#8217;t something I get to do as much as I would like, there are ideas I have for it. As we have deployed the application on client sites there are change requests from clients also. These often find their way back into the download file. I&#8217;m also always happy to hear suggestions from the Community on how the app could be improved.</p>
<p>One of the ideas I have presently is to add Dimension and Measure groups, so that these can be selected from a drop-down in one go, rather than picking them separately. For instance, with the Sense Usage apps I tend to pick a view that has Total Usage, Today&#8217;s Usage, This Weeks Usage, Rolling 30 Day Usage and Days Since Last Licence Use, all shown by User, to pick which users should be allocated or de-allocated licences. With no hide condition on Filter Panes (yet) they would leave redundant objects on the screen if not configured. Besides, bookmarks provide quite a neat way of saving groups of items &#8211; so this has remained on the back burner.</p>
<p>Something I have found myself doing on a number of roll-outs of the app is to add a button to each sheet. On one of the demos I have added a button to link to a web page for further information, elsewhere I have added a button to reload the app. What I am considering is adding a button on each sheet, which only appears if the destination and legend for the button is defined in the metadata spreadsheet. I think this could be a nice addition, but not one that has bubbled to the top of the list yet.</p>
<p>The beauty of the Instant Sense Application is that the one application can have many different data sources and meta-data files loaded into it. If I create any more, which is likely to happen, then these will be added to the download. It was also my hope that other people might contribute script and meta-data files for other data sources. If you have the Instant Sense Application pointing at a data source that might be useful for others, please get in touch to see how we might roll that out.</p>
<p>If you fancy creating a load script and meta-data file, perhaps over data related to a hobby or interest, then it would be great to hear from you also. That app could be made available either part of the application download or as a hosted demo.</p>
<p>If you are using the application, for any reason, it would be great to hear from you. You can comment on this blog post, on our social posts, or get in touch with me directly.</p>
<p>Thanks everyone! It has been incredible to see how many times this application has been downloaded, and I really hope it is helping you to deliver better analytics in less time.</p>
<p>The post <a href="https://www.quickintelligence.co.uk/instant-qlik-sense-application-changes-in-2022/">Instant Qlik Sense Application Changes in 2022</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.quickintelligence.co.uk/instant-qlik-sense-application-changes-in-2022/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1505608</post-id>	</item>
		<item>
		<title>Google SMTP and IMAP to break in Qlik Apps Next Month</title>
		<link>https://www.quickintelligence.co.uk/google-smtp-and-imap-to-break-gmail/</link>
					<comments>https://www.quickintelligence.co.uk/google-smtp-and-imap-to-break-gmail/#comments</comments>
		
		<dc:creator><![CDATA[Steve Dark]]></dc:creator>
		<pubDate>Mon, 25 Apr 2022 08:45:18 +0000</pubDate>
				<category><![CDATA[Qlik Sense Tutorials]]></category>
		<category><![CDATA[QlikView Tutorial]]></category>
		<category><![CDATA[GMail]]></category>
		<category><![CDATA[IMAP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Settings]]></category>
		<category><![CDATA[SMTP]]></category>
		<guid isPermaLink="false">https://www.quickintelligence.co.uk/?p=1505460</guid>

					<description><![CDATA[<p>Many posts and articles, including on this blog, have recommended the use of GMail for sending and receiving mails with Qlik. More recently this has required a switch on the Google Account to Allow Less Secure Apps. Support for this is ending on the 31st May, here’s what you need to know. Why Use GMail  [...]</p>
<p>The post <a href="https://www.quickintelligence.co.uk/google-smtp-and-imap-to-break-gmail/">Google SMTP and IMAP to break in Qlik Apps Next Month</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Many posts and articles, including on <a href="https://www.quickintelligence.co.uk/sense-capacity-licence-notify/" target="_blank" rel="noopener">this blog</a>, have recommended the use of GMail for sending and receiving mails with Qlik. More recently this has required a switch on the Google Account to <a href="https://support.google.com/accounts/answer/6010255" target="_blank" rel="noopener">Allow Less Secure Apps</a>. Support for this is ending on the 31st May, here&#8217;s what you need to know.<br />
<span id="more-1505460"></span></p>
<h3>Why Use GMail For Sending and Receiving From Qlik?</h3>
<p><img decoding="async" class="alignright size-medium wp-image-1505461" src="https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/GMailInbox-300x191.png" alt="GMail Inbox" width="300" height="191" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/GMailInbox-200x127.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/GMailInbox-300x191.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/GMailInbox-400x254.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/GMailInbox-460x295.png 460w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/GMailInbox-600x382.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/GMailInbox-768x488.png 768w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/GMailInbox-800x509.png 800w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/GMailInbox.png 805w" sizes="(max-width: 300px) 100vw, 300px" />There are a wide number of features within the Qlik ecosystem that require interaction with email. QlikView Enterprise allows sending of alerts on task failures, NPrinting is all about distributing reports and Qlik Sense SaaS has multiple features for sending mails, from task failure notifications to subscriptions to charts or sheets. Beyond the obvious use cases there are many more reasons why you may interact with a mail server, such as <a href="https://www.quickintelligence.co.uk/send-data-from-qlik-load-script/" target="_blank" rel="noopener">Sending Notifications From The Load Script</a> or even using a mail server as a data source, such as in this <a href="https://www.quickintelligence.co.uk/netgear-router-logs-qlik-sense/" target="_blank" rel="noopener">example of loading router logs</a>.</p>
<p>Many companies use <a href="https://workspace.google.com/" target="_blank" rel="noopener">Google Workspace</a> for their internal systems, so using a Workspace account for sending and receiving mail makes sense, and for individuals learning Sense spinning up a <a href="https://www.google.com/intl/en-GB/gmail/about/" target="_blank" rel="noopener">GMail</a> account for this purpose is a no cost way of achieving the same result.</p>
<h3>Why Allow Access For Less Secure Apps?</h3>
<p>Google, and general security best practice, recommend using 2FA for authentication. Google Accounts implement this via Google Prompts (on a signed in phone), text message, the <a href="https://support.google.com/accounts/answer/1066447" target="_blank" rel="noopener">Google Authenticator</a> app or a physical device. Having a third party application (or, ironically, Google&#8217;s own email migrate tools) connect to your account via SMTP, IMAP or POP3 is deemed less secure as it inherently uses a username as password only to connect.</p>
<p>The solution for this, for the past couple of years, has been to set a switch on the Google Account that is being used in this way to say that you are comfortable with username and password access to the account in this way. Recently though, a new message has appeared on the dialog where this switch is set:</p>
<p><img decoding="async" class="alignright size-full wp-image-1505463" src="https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Less-Secure-Apps-Dialog.png" alt="Less Secure App Switch Dialog" width="849" height="246" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Less-Secure-Apps-Dialog-200x58.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Less-Secure-Apps-Dialog-300x87.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Less-Secure-Apps-Dialog-400x116.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Less-Secure-Apps-Dialog-600x174.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Less-Secure-Apps-Dialog-768x223.png 768w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Less-Secure-Apps-Dialog-800x232.png 800w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Less-Secure-Apps-Dialog.png 849w" sizes="(max-width: 849px) 100vw, 849px" /></p>
<p>It advises that this access will be revoked from the 30th of May, and the <a href="https://support.google.com/accounts/answer/6010255" target="_blank" rel="noopener">Find Out More</a> link gives a bit more background, but not quite enough. The long and the short is though, that if you are using GMail servers after this date, without an App Password, they will no longer function correctly.</p>
<h3>So, How Do I Fix This?</h3>
<p>At the bottom of that article there is a link to information on <a href="https://support.google.com/accounts/answer/185833" target="_blank" rel="noopener">Signing In With App Passwords</a>, this is a much more helpful document. The steps to resolve the issue are outlined here though.</p>
<p><strong>Head to Account Settings and Security for the account you wish to use</strong></p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505467" src="https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Google-Security-Menu.png" alt="Google Security Menu" width="350" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Google-Security-Menu-200x106.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Google-Security-Menu-300x159.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Google-Security-Menu-400x212.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Google-Security-Menu.png 497w" sizes="(max-width: 497px) 100vw, 497px" /></p>
<p><strong>Turn on 2FA for the account you wish to use</strong></p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505466" src="https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Google-Prompts.png" alt="Google Prompt Methods" width="510" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Google-Prompts-200x38.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Google-Prompts-300x57.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Google-Prompts-400x76.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Google-Prompts-600x114.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Google-Prompts-669x128.png 669w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Google-Prompts.png 672w" sizes="(max-width: 672px) 100vw, 672px" /></p>
<p><strong>Select to create an App Password for this account</strong></p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505470" src="https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/App-Passwords-Menu.png" alt="App Passwords Menu" width="510" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/App-Passwords-Menu-200x17.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/App-Passwords-Menu-300x25.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/App-Passwords-Menu-400x33.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/App-Passwords-Menu-600x50.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/App-Passwords-Menu-768x64.png 768w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/App-Passwords-Menu-800x67.png 800w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/App-Passwords-Menu.png 848w" sizes="(max-width: 848px) 100vw, 848px" /></p>
<p><strong>Select Other from the app list and enter Qlik Sense or similar</strong></p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505468" src="https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Create-Google-App-Password.png" alt="Create Google App Password" width="510" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Create-Google-App-Password-200x129.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Create-Google-App-Password-300x194.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Create-Google-App-Password-400x259.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Create-Google-App-Password-600x388.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Create-Google-App-Password.png 683w" sizes="(max-width: 683px) 100vw, 683px" /></p>
<p><strong>Copy the generated password to your clipboard</strong></p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505469" src="https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Copy-Google-App-Password.png" alt="Copy Google App Password" width="460" height="335" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Copy-Google-App-Password-200x146.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Copy-Google-App-Password-300x218.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Copy-Google-App-Password-400x291.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Copy-Google-App-Password.png 460w" sizes="(max-width: 460px) 100vw, 460px" /></p>
<p><strong>Use the App Password as you would your normal password</strong></p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505471" src="https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Qlik-Sense-SMTP-Settings.png" alt="Qlik Sense SMTP Settings" width="633" height="285" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Qlik-Sense-SMTP-Settings-200x90.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Qlik-Sense-SMTP-Settings-300x135.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Qlik-Sense-SMTP-Settings-400x180.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Qlik-Sense-SMTP-Settings-600x270.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/04/Qlik-Sense-SMTP-Settings.png 633w" sizes="(max-width: 633px) 100vw, 633px" /></p>
<p>You can come back into the App Password settings to manage old passwords and remove them when you no longer use them. Note that when you change the password on the account any App Passwords will be removed, so you will need to recreate these and plumb them back in when this happens. Note that you can not recover an old App Password, so make sure you enter it everywhere you need to before you lose it from your clipboard (or put it in your password safe).</p>
<p>Once all of this has been done your Qlik apps and servers can interact with your Workspace or GMail account without issue, and they will continue to do so after the date which Google removes support for less secure apps.</p>
<p>I hope this post helps you avoid any nasty surprises next month.</p>
<p>The post <a href="https://www.quickintelligence.co.uk/google-smtp-and-imap-to-break-gmail/">Google SMTP and IMAP to break in Qlik Apps Next Month</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.quickintelligence.co.uk/google-smtp-and-imap-to-break-gmail/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1505460</post-id>	</item>
		<item>
		<title>Back Up Qlik Sense Enterprise Client Managed Applications</title>
		<link>https://www.quickintelligence.co.uk/back-up-qlik-sense-applications/</link>
					<comments>https://www.quickintelligence.co.uk/back-up-qlik-sense-applications/#comments</comments>
		
		<dc:creator><![CDATA[Steve Dark]]></dc:creator>
		<pubDate>Mon, 21 Mar 2022 10:17:24 +0000</pubDate>
				<category><![CDATA[Instant App]]></category>
		<category><![CDATA[Qlik Sense Tutorials]]></category>
		<category><![CDATA[Admin]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Instant Sense App]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Sense]]></category>
		<guid isPermaLink="false">https://www.quickintelligence.co.uk/?p=1505431</guid>

					<description><![CDATA[<p>It is common to back up Qlik Sense Client Managed servers at a server level, often with a virtual machine snapshot. Applications can be backed up by having copies of them in different streams or work areas on the server. Apps can be exported one application at a time using the Export function, which is  [...]</p>
<p>The post <a href="https://www.quickintelligence.co.uk/back-up-qlik-sense-applications/">Back Up Qlik Sense Enterprise Client Managed Applications</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>It is common to back up Qlik Sense Client Managed servers at a server level, often with a virtual machine snapshot. Applications can be backed up by having copies of them in different streams or work areas on the server. Apps can be exported one application at a time using the Export function, which is time consuming. Or a file level backup can be made by copying the repository, but apps are hard to identify as they all have a GUID for the name. This post looks at a simple way that all apps can be copied to a different location, as a QVF file, with a sensible file name.<br />
<span id="more-1505431"></span></p>
<h3>API Connections in Qlik Sense Client Managed</h3>
<p><img decoding="async" class="alignright size-medium wp-image-1505453" src="https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Back-Up-All-Qlik-Sense-Applications-300x199.png" alt="Back Up All Qlik Sense Applications" width="300" height="199" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Back-Up-All-Qlik-Sense-Applications-200x132.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Back-Up-All-Qlik-Sense-Applications-300x199.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Back-Up-All-Qlik-Sense-Applications-400x265.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Back-Up-All-Qlik-Sense-Applications-600x397.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Back-Up-All-Qlik-Sense-Applications-768x509.png 768w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Back-Up-All-Qlik-Sense-Applications.png 773w" sizes="(max-width: 300px) 100vw, 300px" />Straight of the box with a clean install Sense has a number of REST Connections created for you to explore your environment. It&#8217;s well worth exploring what these connections offer, with regards to looking at users and usage.</p>
<p>For this post though we are going to be looking at the <strong>monitor_apps_REST_app</strong> connection.</p>
<p>Create a new app and go to the <strong>Data Load Editor</strong>. If you can see the <strong>monitor_apps_REST_app</strong> connection we are good to go. If it&#8217;s not there you will need to grant yourself rights in the <strong>QMC</strong> under the <strong>Data Connections</strong> settings, find the correct connector and select <strong>Security Rules</strong>.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505432" src="https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Qlik-Connector-Settings.png" alt="Qlik Connector Settings" width="531" height="145" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Qlik-Connector-Settings-200x55.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Qlik-Connector-Settings-300x82.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Qlik-Connector-Settings-400x109.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Qlik-Connector-Settings.png 531w" sizes="(max-width: 531px) 100vw, 531px" /></p>
<p>From here you can grant yourself access to the one connection by your name or user id:</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505433" src="https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/User-Permissions-Connection.png" alt="User Permissions Connection" width="603" height="166" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/User-Permissions-Connection-200x55.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/User-Permissions-Connection-300x83.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/User-Permissions-Connection-400x110.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/User-Permissions-Connection-600x165.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/User-Permissions-Connection.png 603w" sizes="(max-width: 603px) 100vw, 603px" /></p>
<p>Or alternatively, if you are a <strong>RootAdmin</strong> on the <strong>QMC</strong> you may want to grant the <strong>RootAdmin</strong> role access to all connections on the server. This will mean that administrators can all explore all of the default connections and keep an eye on what users are creating also. Do this by replacing the GUID of the connection in the <strong>Resource Filter</strong> with an asterisk. Obviously, you can tailor the permissions to be whatever you need.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505434" src="https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/RootAdmin-Permissions-Connection.png" alt="RootAdmin Permissions Connection" width="608" height="187" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/RootAdmin-Permissions-Connection-200x62.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/RootAdmin-Permissions-Connection-300x92.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/RootAdmin-Permissions-Connection-400x123.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/RootAdmin-Permissions-Connection-600x185.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/RootAdmin-Permissions-Connection.png 608w" sizes="(max-width: 608px) 100vw, 608px" /></p>
<p>When you go back to the <strong>Data Load Editor</strong> in another tab the connections will not have appeared automatically. You will have to refresh the browser with a <strong>Shift-F5</strong>, or click the refresh button in the browser toolbar.</p>
<h3>Loading Data From REST API Connection</h3>
<p>Now you have access to the correct REST connection, you can use the <strong>Select Data</strong> icon next to the <strong>monitor_apps_REST_app</strong> connection to look at the data. Alternatively, you can use the script here to pull the information that you need.</p>
<p>Before we connect to the data though, we are going to set up some variables which describe where the apps currently reside and where we want to back them up to. The apps will be in your <strong>repository</strong>, the location of which will have been set when Sense was installed. There will be a share, most likely on the Sense server, pointing to this location. In here find the Apps folder, which contains a file for each app, with a GUID for a name and no extension. The destination is simply where you want to copy to. Here I create a dated folder for the backup:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Set up locations of Sense Repository and a backup location
// Used in the backup script field
let vSrcFolder = 'c:\QlikSenseRepository\Apps\';
let vDestFolder = 'c:\SenseBackups\AppBackup' &amp; date(today(), 'YYYYMMDD') &amp; '\';</code></pre>
<p>A connection then needs to be made to the REST API in order to load data from it:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Connect to the REST connection
LIB CONNECT TO 'monitor_apps_REST_app';</code></pre>
<p>With this in place we can then pull the data from the REST connection, using this code:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Load raw JSON Data
RawRESTData:
SQL SELECT
"id" AS "id_u1",
"createdDate",
"modifiedDate",
"modifiedByUserName",
"name" AS "name_u1",
"publishTime",
"published",
"description",
"fileSize",
"lastReloadTime",
"thumbnail",
"savedInProductVersion",
"availabilityStatus",
"schemaPath",
"__KEY_root",
(SELECT
"userId",
"userDirectory",
"name",
"__FK_owner"
FROM "owner" FK "__FK_owner"),
(SELECT
"name" AS "name_u0",
"__FK_stream"
FROM "stream" FK "__FK_stream")
FROM JSON (wrap on) "root" PK "__KEY_root";</code></pre>
<p>As with loading data from just about any REST connection, the data will come down in a single table, even though there are three logical tables in the data model. Each row of data will have values in columns in one of the three sets (Application Details, User Details and Stream), values in the other columns will be null. Along with these values are primary and foreign keys to join things correctly.</p>
<p>Using <strong>Select Data</strong> the Qlik engine will create some code which will load three separate tables into the end data model. In this case however we know there is a one-to-one relationship between an Application and its Owner and the Stream it is in (if the application is published). We can therefore create a cleaner and flatter data model with <a href="https://www.quickintelligence.co.uk/applymap-is-it-so-wrong/">ApplyMap</a>.</p>
<p>There is much more we can do also, to make it easier to select the apps we want to back up, and do further analysis on apps. The same data feed can be used to help use identify apps which are not being maintained or are bloated.</p>
<h3>Cleaning Up The Application Table</h3>
<p>Now we have all of the data in a temporary table we need to clean it up and augment it. This will be done with a number of <a href="https://help.qlik.com/en-US/sense/February2022/Subsystems/Hub/Content/Sense_Hub/Scripting/load-data-from-previously-loaded-table.htm" target="_blank" rel="noopener">RESIDENT</a> loads and a couple of <a href="https://www.quickintelligence.co.uk/preceding-load-qlikview/">Preceding Loads</a>.</p>
<p>First we are going to create some ApplyMap statements to bring in the Owner name, Owner login and Stream. These use the foreign keys in the flat table.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Create mapping tables from parts of the REST result
Map_Owner:
MAPPING LOAD
[__FK_owner],
[name]
RESIDENT RawRESTData
WHERE NOT IsNull([__FK_owner]);

Map_OwnerLogin:
MAPPING LOAD
[__FK_owner],
[userDirectory] &amp; '\' &amp; [userId] as Login
RESIDENT RawRESTData
WHERE NOT IsNull([__FK_owner]);

Map_Stream:
MAPPING LOAD
[__FK_stream],
[name_u0]
RESIDENT RawRESTData
WHERE NOT IsNull([__FK_stream]);</code></pre>
<p>Then some variables which act as functions in the subsequent RESIDENT load. These all utilise the fact that a SET statement does not evaluate the code that it puts into a variable (rather it copies code verbatim) and the functionality of <a href="https://www.quickintelligence.co.uk/variables-parameters-load-script/">passing parameters into variables</a>.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Create parameterised variables for repeated tasks
set vTime = Date(if(Date#(left($1, 10), 'YYYY-MM-DD') &lt; 0, null(),
Date#(left(replace($1, 'T', ' '), 19), 'YYYY-MM-DD hh:mm:ss')),
'DD MMM YYYY hh:mm:ss') as [$2 Date Time];
set vDP = Date(DayStart([$1 Date Time]), 'DD MMM YYYY') as [$1 Date],
Date(MonthStart([$1 Date Time]), 'MMM-YYYY') as [$1 Month],
Month([$1 Date Time]) as [$1 Month Name],
Year([$1 Date Time]) as [$1 Year],
WeekDay([$1 Date Time]) as [$1 Day],
today() - DayStart([$1 Date Time]) as [Days Since $1];
set vNS = if($1 = '', 'Not Specified', $1);</code></pre>
<p>The first function here receives the name of a date field and checks whether it has a value, if it does it returns that converted to a date and formatted correctly. The second takes the date time field created by the previous variable (thanks to a preceding load) and creates various date parts for these dates. The final variable checks a given field name and returns <strong>Not Specified</strong> if the value is empty, otherwise it returns the value.</p>
<p>You will see all of these variables used in the next block of code.</p>
<p>We can then do our final RESIDENT load to bring through all of the original data, with the various transformations applied.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">Applications:
LOAD
1 as ApplicationCount,
*,
RangeMin([Days Since Created],
[Days Since Modified],
[Days Since Published],
[Days Since Last Reload]) as [Days Since Last Touch],
// Export this column to create a script to backup your apps from the Repository
'copy $(vSrcFolder)' &amp; GUID &amp;
' "$(vDestFolder)' &amp; Stream &amp; ' -- ' &amp;
Application &amp; '.qvf"' as [App Backup Script]
;
LOAD
*,
// Create all required date parts
$(vDP(Created)),
$(vDP(Modified)),
$(vDP(Published)),
$(vDP(Last Reload))
;
LOAD
id_u1 as GUID,
// Convert all required dates
$(vTime(createdDate, Created)),
$(vTime(modifiedDate, Modified)),
$(vTime(lastReloadTime, Last Reload)),
$(vTime(publishTime, Published)),
[modifiedByUserName] as [Modified By],
[name_u1] as Application,
[published] as [Is Published],
$(vNS(description)) as [Application Description],
fileSize / 1000000 as [File Size],
$(vNS(thumbnail)) as Thumbnail,
[savedInProductVersion] as [Product Version],
[availabilityStatus] as Availability,
ApplyMap('Map_Owner', [__KEY_root], 'Not Known') as Owner,
ApplyMap('Map_OwnerLogin', [__KEY_root], 'Not Known') as [Owner Login],
ApplyMap('Map_Stream', [__KEY_root], 'None') as Stream
RESIDENT RawRESTData
WHERE NOT IsNull([__KEY_root]);</code></pre>
<p>Then, to tidy things up and avoid any strange joins, we can remove the temporary table which was created when the data was pulled from the REST connection.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">DROP TABLE RawRESTData;</code></pre>
<p>And that is our load script done.</p>
<h3>Unpacking The Application Back Up Code</h3>
<p>There is quite a lot going on in that last step of the code. Hopefully you can work out what is going on with most, if not all, of it. Much of it is to give us some extra fields to do some analysis of the applications on our server (more on that later), but for now just to focus on the creation of the <strong>App Backup Script</strong> field.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">'copy $(vSrcFolder)' &amp; GUID &amp; ' "$(vDestFolder)' &amp;
Stream &amp; ' -- ' &amp; Application &amp; '.qvf"' as [App Backup Script]</code></pre>
<p>Here we are starting with the copy statement we wish to use (you can replace this with XCopy or add parameters if you wish), adding in the two variables we set up right at the top of the script and pilling out the GUID which is the source filename for our script. There is then the building of the output filename and the placing this in a fieldname.</p>
<p>The construction of the output filename and path you can also alter if you wish, I have gone for the stream name (which is set to None for items that are not published) a double hyphen (as apps and streams may have hyphens in the name already) the application name and finally the QVF extension.</p>
<p>This then builds code that we can use in a <strong>Command Prompt</strong> on our Qlik Sense server to move the apps to their backup location.</p>
<h3>Creating and Using The Back Up Script</h3>
<p>Now our script is complete, click <strong>Load Data</strong> to bring all the data in from the REST connection. Once this has finished loading click <strong>Analyse Sheet</strong> and change to <strong>Edit</strong> mode. Grab a <strong>Table</strong> object from the <strong>Charts</strong> and drop it on the sheet. Click to <strong>Add Dimension</strong> and add in the <strong>App Backup Script</strong> dimension.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505441" src="https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Add-App-Backup-Dimension.png" alt="Add App Backup Dimension" width="420" height="149" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Add-App-Backup-Dimension-200x71.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Add-App-Backup-Dimension-300x106.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Add-App-Backup-Dimension-400x142.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Add-App-Backup-Dimension.png 420w" sizes="(max-width: 420px) 100vw, 420px" /></p>
<p>Come out of Edit mode and you can then right click to export the table to Excel. Open this spreadsheet and copy and paste the code into a new <strong>Notepad</strong> (or other text editor) window and then save the script as a <strong>.bat</strong> file. This file can then be copied onto the server and executed to perform the backup.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505450" src="https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Back-Up-Script-Running.png" alt="Back Up Script Running" width="872" height="231" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Back-Up-Script-Running-200x53.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Back-Up-Script-Running-300x79.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Back-Up-Script-Running-400x106.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Back-Up-Script-Running-600x159.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Back-Up-Script-Running-768x203.png 768w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Back-Up-Script-Running-800x212.png 800w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Back-Up-Script-Running.png 872w" sizes="(max-width: 872px) 100vw, 872px" /></p>
<p>There is a slight risk of one of the files being corrupted if it is copied whilst a write is in progress, so it is best practice to stop all Sense services before taking the backup. In practice, I have not ever hit a snag with this though and you could simply check the date stamp on the files and see if there were any that were updated at around the time you took your backup and perhaps copy them again.</p>
<p>So there you have a relatively quick and painless way of getting QVFs of all of your Qlik Sense Client Managed Server applications.</p>
<p>I hope you find the technique useful. Please let us know how you get on in the comments below.</p>
<h3>Further Analysis of Your Application Data</h3>
<p>As well as the the information required to filter and export the backup script there were various other data points brought in about the Applications on the Sense Server which you may want to analyse. Finding which applications have not been touched in over a year, for example.</p>
<p>Fortunately we have your back with this, with our <a href="https://www.quickintelligence.co.uk/instant-qlik-sense-app/" target="_blank" rel="noopener">Instant Sense Application</a>. This is an application template which ships with a number of pre-written load scripts (including the one above) and metadata files so that you can re-purpose the application to use your own data sources. Out of the box you can view a number of KPIs over these application data:</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505443" src="https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Application-KPIs.png" alt="Some Application KPIs" width="905" height="246" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Application-KPIs-200x54.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Application-KPIs-300x82.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Application-KPIs-400x109.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Application-KPIs-600x163.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Application-KPIs-768x209.png 768w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Application-KPIs-800x217.png 800w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Application-KPIs.png 905w" sizes="(max-width: 905px) 100vw, 905px" /></p>
<p>It also allows you to break the various measures down over different dimensions and plot those different measures against each other, by a selected dimension:</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505444" src="https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Application-Scatter-Chart.png" alt="Application Scatter Chart" width="611" height="345" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Application-Scatter-Chart-200x113.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Application-Scatter-Chart-300x169.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Application-Scatter-Chart-400x226.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Application-Scatter-Chart-600x339.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Application-Scatter-Chart.png 611w" sizes="(max-width: 611px) 100vw, 611px" /></p>
<p>Finally there is the user defined table, where the user can select a number of dimensions and measures and view these in a table which can then be exported as required:</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505446" src="https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Application-Measure-Table.png" alt="Application Measure Table" width="929" height="356" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Application-Measure-Table-200x77.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Application-Measure-Table-300x115.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Application-Measure-Table-400x153.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Application-Measure-Table-600x230.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Application-Measure-Table-768x294.png 768w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Application-Measure-Table-800x307.png 800w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Application-Measure-Table.png 929w" sizes="(max-width: 929px) 100vw, 929px" /></p>
<p>Everything in the application is driven from a metadata spreadsheet, this means that you can configure the app so it can be used over whatever data source you like:</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505448" src="https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Instant-Application-Metadata.png" alt="Instant Application Metadata" width="697" height="142" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Instant-Application-Metadata-200x41.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Instant-Application-Metadata-300x61.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Instant-Application-Metadata-400x81.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Instant-Application-Metadata-600x122.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2022/03/Instant-Application-Metadata.png 697w" sizes="(max-width: 697px) 100vw, 697px" /></p>
<p>All in all there are twelve sheets of user configurable visualisations, just waiting for you to bring your own data. The best thing is that it is free to download and use.</p>
<p>Find out more about the application, and download it, from here:</p>
<p><strong><a href="https://www.quickintelligence.co.uk/instant-qlik-sense-app/" target="_blank" rel="noopener">https://www.quickintelligence.co.uk/instant-qlik-sense-app/</a></strong></p>
<p>More technical details, including how the application is built can be found in this <a href="https://www.quickintelligence.co.uk/instant-qlik-sense-application/" target="_blank" rel="noopener">Instant Sense Application blog post</a>.</p>
<p>If you have any questions or comments about anything above, please do drop us a comment below.</p>
<p>If you would like to share a load script and metadata spreadsheet for the Instant Sense Application then we would love to hear from you.</p>
<p>The post <a href="https://www.quickintelligence.co.uk/back-up-qlik-sense-applications/">Back Up Qlik Sense Enterprise Client Managed Applications</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.quickintelligence.co.uk/back-up-qlik-sense-applications/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1505431</post-id>	</item>
		<item>
		<title>Use IFTTT and Webhooks to Send Data from Qlik Sense</title>
		<link>https://www.quickintelligence.co.uk/ifttt-webhooks-qlik-cloud/</link>
					<comments>https://www.quickintelligence.co.uk/ifttt-webhooks-qlik-cloud/#respond</comments>
		
		<dc:creator><![CDATA[Steve Dark]]></dc:creator>
		<pubDate>Wed, 12 May 2021 09:05:54 +0000</pubDate>
				<category><![CDATA[Qlik Sense]]></category>
		<category><![CDATA[Qlik Sense Tutorials]]></category>
		<category><![CDATA[IFTTT]]></category>
		<category><![CDATA[Sense]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Webhooks]]></category>
		<guid isPermaLink="false">https://www.quickintelligence.co.uk/?p=1505353</guid>

					<description><![CDATA[<p>Webhooks are a glue that can hold many different services together. This post shows how they can be used to call IFTTT from the Qlik load script, which then opens up a whole world of possibilities, such as writing to a Google Sheet. So, Why Use IFTTT With Qlik Sense? In my previous blog post  [...]</p>
<p>The post <a href="https://www.quickintelligence.co.uk/ifttt-webhooks-qlik-cloud/">Use IFTTT and Webhooks to Send Data from Qlik Sense</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Webhooks are a glue that can hold many different services together. This post shows how they can be used to call IFTTT from the Qlik load script, which then opens up a whole world of possibilities, such as writing to a Google Sheet.<br />
<span id="more-1505353"></span></p>
<h3>So, Why Use IFTTT With Qlik Sense?</h3>
<p>In my previous blog post I showed how to create an app to monitor <a href="https://www.quickintelligence.co.uk/sense-capacity-licence-notify/" target="_blank" rel="noopener">Qlik analyzer capacity licence usage</a> in Qlik Cloud. My favourite response to the last post was from Tom Wittig, who said he had five clients needing the app.</p>
<p><a href="https://www.linkedin.com/feed/update/urn:li:activity:6795976356673982464?commentUrn=urn%3Ali%3Acomment%3A%28activity%3A6795976356673982464%2C6796039225348300800%29&amp;replyUrn=urn%3Ali%3Acomment%3A%28activity%3A6795976356673982464%2C6796060876433616896%29" target="_blank" rel="noopener"><img decoding="async" class="aligncenter size-full wp-image-1505374" src="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Tom-Wittig-LinkedIn-Comment.png" alt="I've never clicked so fast lol. I have 5 customers asking about this." width="481" height="133" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Tom-Wittig-LinkedIn-Comment-200x55.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Tom-Wittig-LinkedIn-Comment-300x83.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Tom-Wittig-LinkedIn-Comment-400x111.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Tom-Wittig-LinkedIn-Comment.png 481w" sizes="(max-width: 481px) 100vw, 481px" /></a></p>
<p>That got me thinking, what if you have many sites to keep an eye on in Qlik SaaS? You would want to take the information from each site, place it into a common repository and then build an app over that. But how?</p>
<p>There are plenty of methods for storing files out, but this would require a shared DropBox or Google Drive, between clients, or many clients&#8217; accounts linked to by the partner. Neither of these approaches feels like a good idea. Pushing just the data that is required via a one way service that can then store the data would be ideal.</p>
<p><img decoding="async" class="alignright size-medium wp-image-1505371" src="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/IFTTT-Qlik-Sense-Webhooks-Google-300x189.png" alt="IFTTT Qlik Sense Webhooks Google" width="300" height="189" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/IFTTT-Qlik-Sense-Webhooks-Google-200x126.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/IFTTT-Qlik-Sense-Webhooks-Google-300x189.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/IFTTT-Qlik-Sense-Webhooks-Google-320x202.png 320w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/IFTTT-Qlik-Sense-Webhooks-Google-400x252.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/IFTTT-Qlik-Sense-Webhooks-Google-600x379.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/IFTTT-Qlik-Sense-Webhooks-Google.png 634w" sizes="(max-width: 300px) 100vw, 300px" />Using a combination of the REST connector, Webhooks, <a href="https://ifttt.com/" target="_blank" rel="noopener">If This Then That</a> and Google Sheets it is simple to achieve this.</p>
<p>I did a previous post on using Webhooks to <a href="https://www.quickintelligence.co.uk/qlik-ifttt-iot/" target="_blank" rel="noopener">start a Sonos playlist when a new customer is obtained</a>, but this is a more practical application of the same technique.</p>
<h3>Signing Up For An IFTTT Account</h3>
<p>If This Then That allows you to connect all of the various services you have and get them talking to each other. It&#8217;s well worth taking a look through the various example applets that they have available. If you have an account already you will know this. If not, it is simple and quick to create one and get started.</p>
<p>Head along to <a href="https://ifttt.com/" target="_blank" rel="noopener">https://ifttt.com/</a>, here you can sign up with an email address or an Apple, Google or Facebook account. As we&#8217;re going to be using Google Sheets I&#8217;m going to use a Google account, you can take your pick though.</p>
<p><a href="https://ifttt.com/" target="_blank" rel="noopener"><img decoding="async" class="aligncenter size-full wp-image-1505354" src="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/IFTTT-Sign-Up.png" alt="IFTTT Sign Up Page" width="378" height="144" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/IFTTT-Sign-Up-200x76.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/IFTTT-Sign-Up-300x114.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/IFTTT-Sign-Up.png 378w" sizes="(max-width: 378px) 100vw, 378px" /></a></p>
<h3>Creating the IFTTT Applet</h3>
<p>Once you have signed up or signed in you will get to the main IFTTT page. You may want to take the time to take a look around, or you can just crack on and click the <strong>Create</strong> button.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505355" src="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/IFTTT-Create-Button.png" alt="IFTTT Create Button" width="466" height="49" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/IFTTT-Create-Button-200x21.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/IFTTT-Create-Button-300x32.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/IFTTT-Create-Button-400x42.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/IFTTT-Create-Button-460x49.png 460w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/IFTTT-Create-Button.png 466w" sizes="(max-width: 466px) 100vw, 466px" /></p>
<p>As the name suggests, basic apps all consist of a trigger (If This) and an action (Then That), click the <strong>Add</strong> button to set up the If</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505356" src="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/If-This-Then-That-Workflow.png" alt="If This Then That Workflow" width="357" height="168" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/If-This-Then-That-Workflow-200x94.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/If-This-Then-That-Workflow-300x141.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/If-This-Then-That-Workflow.png 357w" sizes="(max-width: 357px) 100vw, 357px" /></p>
<p>First you need to chose the service that you will use for the trigger. Search for and select Webhooks</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505357" src="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Search-For-Webhooks.png" alt="Search for IFTTT Webhooks" width="402" height="185" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Search-For-Webhooks-200x92.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Search-For-Webhooks-300x138.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Search-For-Webhooks-400x184.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Search-For-Webhooks.png 402w" sizes="(max-width: 402px) 100vw, 402px" /></p>
<p>Many of the services will have lots of different options here, but Webhooks just have one simple action &#8211; receive a web request. Click this.</p>
<p>Pretty much every service will require a connection to that service, this is true of Webhooks, so click the Connect button to do this. Most services will then require credentials (as you will see when we connect to Google Sheets in a moment), but Webhooks will just create the connection for you.</p>
<p>You will then be prompted to create a trigger, which you need to name. This name will be used when you call the Webhook, and it will be available when we create the event caused by the Webhook. Make sure you take a note of this name.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505358" src="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Capacity-Usage-Create.png" alt="Capacity Usage Create Trigger" width="378" height="232" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Capacity-Usage-Create-200x123.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Capacity-Usage-Create-300x184.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Capacity-Usage-Create.png 378w" sizes="(max-width: 378px) 100vw, 378px" /></p>
<p>When the name has been provided click the <strong>Create Trigger</strong> button.</p>
<p>With the trigger created you can now click the <strong>Add</strong> button for the action.</p>
<p>Now you need to search for and select <strong>Google Sheets</strong>.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505360" src="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/IFTTT-Google-Sheets-Search.png" alt="Google Sheets Search" width="582" height="183" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/IFTTT-Google-Sheets-Search-200x63.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/IFTTT-Google-Sheets-Search-300x94.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/IFTTT-Google-Sheets-Search-400x126.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/IFTTT-Google-Sheets-Search.png 582w" sizes="(max-width: 582px) 100vw, 582px" /></p>
<p>From here select <strong>Add Row To Spreadsheet</strong>. Again you will need to connect to the service, do this by clicking the <strong>Connect</strong> button. A popup will appear where you can sign into your Google account and authenticate IFTTT to work with it.</p>
<p>There are lots of other endpoints that you can use to write to, such as Slack, Twitter and Gmail. Choose and configure the one that best suits you.</p>
<p>For a Google Sheet you need to provide the name of the spreadsheet (clear the default one first) enter the values to enter into each cell of the spreadsheet (defaults here are fine) and specify which folder in your Google Drive you would like the spreadsheet to reside. Click <strong>Create Action</strong> when done.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505361" src="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Configure-Spreadsheet.png" alt="Configure Spreadsheet" width="266" height="379" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Configure-Spreadsheet-200x285.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Configure-Spreadsheet-211x300.png 211w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Configure-Spreadsheet.png 266w" sizes="(max-width: 266px) 100vw, 266px" /></p>
<p>That has now created the applet and you can click <strong>Continue</strong>.</p>
<h3>Using The New Applet</h3>
<p>After clicking continue you will be shown the default name for the applet. This will be a description of what it does. You can swap this for a more useful name if you like. Click the <strong>Finish</strong> button when you are happy with the name.</p>
<p>The applet is now present and working, but the issue is that you won&#8217;t know how to call it. Click on the Webhooks icon above the to the configuration screen.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505362" src="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Webhooks-Icon.png" alt="Webhooks Icon" width="72" height="74" /></p>
<p>From that screen click the <strong>Documentation</strong> button at the top right of the screen. This will take you to a screen where you can test your Webhook.</p>
<p>Replace the text <strong>{event}</strong> with the event name that you used when setting up the trigger. Enter some values into the three value text boxes and click <strong>Test It</strong>.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505363" src="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Test-The-Webhook.png" alt="Test The Webhook" width="554" height="360" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Test-The-Webhook-200x130.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Test-The-Webhook-300x195.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Test-The-Webhook-400x260.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Test-The-Webhook.png 554w" sizes="(max-width: 554px) 100vw, 554px" /></p>
<p>You will need to copy the Trigger URL to a safe place to be able to use it later, this is the one that looks like this:</p>
<p><strong>https://maker.ifttt.com/trigger/capacity_usage/with/key/ABCDE1234567890</strong></p>
<p>Once the test has been fired you should be able to go and find the spreadsheet, but I have noticed it can take a few minutes to appear.</p>
<h3>Plumbing The Webhook Into The App</h3>
<p>To use this Webhook with the Capacity Licence checking app I made available <a href="https://www.quickintelligence.co.uk/sense-capacity-licence-notify/">last week</a> you will need to download it from <a href="https://community.qlik.com/t5/Documents/Qlik-Sense-App-Monitor-Capacity-Licences-on-Qlik-Cloud-and/ta-p/1805633" target="_blank" rel="noopener">here</a>. To plumb it into another app you will need to put the values you want to send into variables in your load script.</p>
<p>To call the URL you will need a REST connection set up, as described in the previous blog post. This can point to any URL, as we are going to change it using WITH CONNECTION, I typically use <a href="https://jsonplaceholder.typicode.com/posts" target="_blank" rel="noopener">https://jsonplaceholder.typicode.com/posts</a> for this purpose. Give the connection the name <strong>GenericGET</strong>.</p>
<p>You then just need to add the following code after the point where the variables are set:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Send details to a Webhook
LIB CONNECT TO 'GenericGET';
SET errormode = 0;
SendResults:
SQL SELECT
"col_1"
FROM CSV (header off, delimiter ",", quote """") "CSV_source"
WITH CONNECTION (
URL "https://maker.ifttt.com/trigger/capacity_usage/with/key/ABCDE1234567890?value1=$(vUsed)&amp;value2=$(vRunRate)&amp;value3=$(vAvailable)");
SET errormode = 1;</code></pre>
<p>Obviously the key part of the URL will need to change to be your own personal Webhook key that you copied above. You will also need to ensure that the trigger name matches the one you gave when creating the trigger. The URL copied in the test step above didn&#8217;t have any parameters, as these were passed in the body of the GET request. You will need to manually type the three parameters to the URL and inject variable values created earlier in the script.</p>
<p>Once the load script has run you can check the result from the call of the Webhook by checking the <strong>col_1</strong> field in Analyze mode in Sense.</p>
<p>You should now have a new row in your spreadsheet with the values you specified in:</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505366" src="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Capacity-Usage-Spreadsheet.png" alt="Capacity Usage Spreadsheet" width="591" height="139" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Capacity-Usage-Spreadsheet-200x47.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Capacity-Usage-Spreadsheet-300x71.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Capacity-Usage-Spreadsheet-400x94.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Capacity-Usage-Spreadsheet.png 591w" sizes="(max-width: 591px) 100vw, 591px" /></p>
<p>As you can see you can insert a row which has headers and new rows will simply be appended to the end. If you have multiple Webhooks appending to the same spreadsheet you just need to ensure that you have a value in a column which shows which numbers have come from where.</p>
<p>Webhooks are a great way to ping small amounts of data between different services, and it is something which is going to be more closely integrated into Sense in future with <a href="https://www.qlik.com/us/products/blendr-io" target="_blank" rel="noopener">blendr.io</a>. You can start using them straight away though, from your load scripts.</p>
<p>Please let me know how you get on with them in the comments below.</p>
<p>The post <a href="https://www.quickintelligence.co.uk/ifttt-webhooks-qlik-cloud/">Use IFTTT and Webhooks to Send Data from Qlik Sense</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.quickintelligence.co.uk/ifttt-webhooks-qlik-cloud/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1505353</post-id>	</item>
		<item>
		<title>Monitor and Notify Sense Capacity Licence Usage in Qlik Cloud</title>
		<link>https://www.quickintelligence.co.uk/sense-capacity-licence-notify/</link>
					<comments>https://www.quickintelligence.co.uk/sense-capacity-licence-notify/#comments</comments>
		
		<dc:creator><![CDATA[Steve Dark]]></dc:creator>
		<pubDate>Wed, 05 May 2021 19:58:03 +0000</pubDate>
				<category><![CDATA[Qlik Sense Tutorials]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[Sense]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.quickintelligence.co.uk/?p=1505340</guid>

					<description><![CDATA[<p>Capacity licences are a great way of granting many, infrequent, users access to your Qlik apps. Monitoring usage of available capacity is critical though and is not immediately straightforward in Qlik Cloud (SaaS). This tutorial, and sample app, show how you can monitor usage and alert when usage is exceeding what is expected. What is  [...]</p>
<p>The post <a href="https://www.quickintelligence.co.uk/sense-capacity-licence-notify/">Monitor and Notify Sense Capacity Licence Usage in Qlik Cloud</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Capacity licences are a great way of granting many, infrequent, users access to your Qlik apps. Monitoring usage of available capacity is critical though and is not immediately straightforward in Qlik Cloud (SaaS). This tutorial, and sample app, show how you can monitor usage and alert when usage is exceeding what is expected.<br />
<span id="more-1505340"></span></p>
<h3>What is Capacity Licencing?</h3>
<p>Purchased in packs of 1,000 minutes per calendar month, a capacity licence is a subscription which can be consumed by any user for access to any app in six minute time slices. This flexibility makes the capacity licence an excellent choice for getting large numbers of infrequent users using Qlik apps.</p>
<p>Once you have these licences though, it is crucial that you monitor things to ensure that you are not burning through your capacity too quickly. Just looking at how many minutes have been consumed against the total is not enough, you need to be aware of how far through the month you are. Looking at current usage against a <a href="https://www.linkedin.com/pulse/improving-your-run-rate-steve-dark/" target="_blank" rel="noopener">run-rate</a> of available minutes allows this. If usage is exceeding the minutes available then someone needs to be notified, so licences can be reallocated or an additional capacity licence pack be added.</p>
<p>This post describes how to set up this monitoring and alerting on Qlik Cloud (SaaS). A similar approach can be taken for client managed also.</p>
<h3>Connecting To The Qlik API</h3>
<p>Information about your Qlik Cloud tenant is exposed through a number of <a href="https://qlik.dev/apis/" target="_blank" rel="noopener">API Endpoints</a>. In order to read from these endpoints <strong>API Keys</strong> need to be enabled under <strong>Management Console Settings</strong>, a nominated user must have <strong>Developer</strong> rights in the <strong>Users</strong> section of the Management Console, and that user needs to generate an API key in the <strong>API Keys</strong> section of their <strong>Profile Settings</strong>. This key is then used in the load script of the app.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505348" src="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/API-Keys.png" alt="API Key Settings" width="582" height="200" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/API-Keys-200x69.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/API-Keys-300x103.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/API-Keys-400x137.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/API-Keys.png 582w" sizes="(max-width: 582px) 100vw, 582px" /></p>
<p>This is quite a convoluted process, but it is well described in the documentation for the <a href="https://community.qlik.com/t5/Support-Updates/The-App-Analyzer-for-Qlik-SaaS-customers-is-available-NOW/ba-p/1734927" target="_blank" rel="noopener">App Analyzer for Qlik SaaS</a>. The analyzer app itself is one you may want to considering in your SaaS tenant.</p>
<p>Once you have an API key, paste it into a safe place as you will need it later.</p>
<p>To implement a similar solution on Qlik Sense Enterprise for Windows (Client Managed) you can use the provided REST connection, <strong>monitor_apps_REST_license_overview</strong>.</p>
<p>Rather than setting up a connection to each API that is needed in your SaaS environment, it makes more sense to create just one and then modify it using <a href="https://help.qlik.com/en-US/connectors/Subsystems/REST_connector_help/Content/Connectors_REST/Load-REST-data/Load-data.htm#WITH-CONNECTION-keyword" target="_blank" rel="noopener">WITH CONNECTION</a>. To enable this, set up a new REST connection, pointing to a placeholder (e.g. <a href="https://jsonplaceholder.typicode.com/posts" target="_blank" rel="noopener">https://jsonplaceholder.typicode.com/posts</a>) with the type set to GET and everything else as defaults. Give this connection the name GenericGET.</p>
<h3>Sending Alerts From The Qlik Load Script</h3>
<p>It is possible to use <a href="https://www.qlik.com/us/products/qlik-sense/data-alerts" target="_blank" rel="noopener">Qlik Alerting</a> in Qlik Cloud, but for this purpose I would suggest simply sending directly from the load script. The SMTP connector in Qlik Cloud allows for this.</p>
<p>Create a new SMTP connection, populating it with the details of the mail server you wish to send via. You may want to set up an email account, such as a <a href="https://accounts.google.com/" target="_blank" rel="noopener">free GMail account</a>, specifically for this purpose. Give this connection the default name of SMTP.</p>
<p>This will allow you to send custom emails from your Qlik load script. In order to do the same in Qlik Sense Enterprise for Windows see this previous blog post on <a href="https://www.quickintelligence.co.uk/send-data-from-qlik-load-script/" target="_blank" rel="noopener">Sending Data from the Qlik Load Script</a>.</p>
<h3>Building The Capacity Usage App</h3>
<p>As with any Qlik app, most of the magic happens in the load script. Here we talk through the code you need to build an alerts app.</p>
<p>First of all some environmental variables need to be set, specifying where your tenant can be found and what email settings you wish to use:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Name or alias of your Qlik Sense Cloud instance
let vInstance = 'instance.region.qlikcloud.com';

// Email configuration fields
let vTo = 'recipient@domain.com';
let vFrom = 'sender@domain.com';
let vFromName = 'Sense Capacity Alert';

// The API key to use - generated under your Profile settings
let vAPIKey = 'ABC123456789';</code></pre>
<p>Note that you will need to paste the API key that you obtained above into this code.</p>
<p>Now some options to configure. Firstly at what percentage of the time-of-month available minutes do you wish to alert, 1 is anything over 100% of usage &#8211; you can increase or decrease this as you wish. You can also specify how frequently you want to be reminded you are over threshold (if usage keeps rising) or ask to be reminded every time the app reloads:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Decimal at which run-rate percent to send alert - 1 = 100%
let vAlertAt = 1;

// Days in which to repeat send of alert - can be a decimal fraction of a day
let vRepeatIn = 0.25;

// Binary flag indicating whether you wish to ignore increase and repeat thresholds
let vSendAll = 0;</code></pre>
<p>Note that the repeat value of 0.25 is equivalent to every six hours. You can adjust as you see fit.</p>
<p>Now we need to connect to the REST connection. This will check your placeholder is present, but do nothing else at this point:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Connect to the REST connector
LIB CONNECT TO 'GenericGET';</code></pre>
<p>Note that if you have created your REST connection in a managed space, you will want to prefix the name with the space name, e.g. &#8216;MySpace:GenericGET&#8217;;.</p>
<p>Most of the heavy lifting of working out where we are in the month is done in this next statement. It connects to the API, gives the credentials defined above, calculates the run rate and formats the output:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Retrieve data and calculate run-rates and percentages
CapacityUsed:
LOAD
*,
num([Used Minutes] / [Available Run Rate], '#,##0.0%') as [Percent Used Run Rate]
;
LOAD
name as [Licence Type],
usageClass as [Usage Type],
units as [Total Minutes],
unitsUsed as [Used Minutes],
num(unitsUsed / units, '#,##0.0%') as [Percent Used],
// Work out a run rate by working out how far through the month we are in days,
// divided by the total number of days in the month
num(units *
((now() - MonthStart(today())) /
Day(MonthEnd(today()))), '#,##0.0') as [Available Run Rate],
overage
WHERE name = 'analyzer_time'
;
SQL SELECT
(SELECT
"name",
"usageClass",
"units",
"unitsUsed",
"overage"
FROM "allotments" FK "__FK_allotments")
FROM JSON (wrap on) "root" PK "__KEY_root"
WITH CONNECTION (
URL "https://$(vInstance)/api/v1/licenses/overview",
HTTPHEADER "Authorization" "Bearer $(vAPIKey)"
)
;</code></pre>
<p>In order to be able to check values and send them in the load script we need to <a href="https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/use-inter-record-functions.htm" target="_blank" rel="noopener">peek</a> them into variables:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Retrieve values from the data set
let vRunRate = num(peek('Percent Used Run Rate', -1, 'CapacityUsed'), '#,##0.0%');
let vTotal = num(peek('Total Minutes', -1, 'CapacityUsed'), '#,##0');
let vUsed = num(peek('Used Minutes', -1, 'CapacityUsed'), '#,##0');
let vPercent = num(peek('Percent Used', -1, 'CapacityUsed'), '#,##0.0%');
let vAvailable = num(peek('Available Run Rate', -1, 'CapacityUsed'), '#,##0.0');</code></pre>
<p>Then to give information back to the user running the script we can use these variables in a set of <a href="https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptRegularStatements/Trace.htm" target="_blank" rel="noopener">trace</a> statements.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Notify of current status to load stream
TRACE ;
TRACE $(vUsed) Minutes of $(vTotal) consumed.;
TRACE $(vPercent) of Total and $(vRunRate) of Run Rate minutes.;</code></pre>
<p>Capacity subscriptions reset at the end of each calendar month. We are only interested in being notified if the previous percentage usage has been exceeded, but we need to reset that if we are in a new month. That is done here:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Reset last run rate if we are in a new month
if Month(alt(vLastRun, 0)) &lt; &gt; month(today()) then
let vLastRunRate = 0;
end if</code></pre>
<p>We then need to decide whether the current run-rate exceeds the value at which we want to alert, and whether other criteria such as used percentage increased and interval time elapsed. This is all in one big if statement:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Check if we have an alert situation and whether repeat and increase criteria met
if vRunRate &gt; vAlertAt and (vSendAll &lt; &gt; 0
or (vRunRate &gt; alt(vLastRunRate, 0) and now() &gt; alt(vLastAlert + vRepeatIn, 0))) then</code></pre>
<p>Now we have to set a couple of variables, to record what level we are alerting at, and when we are doing it. We are also writing to the load script progress window:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs"> TRACE Sending alert to $(vTo);

// Set variables to log last time an alert sent
let vLastRunRate = vRunRate;
let vLastAlert = now();</code></pre>
<p>Sending emails from the Qlik SaaS load script requires a connection to the SMTP connection to be made:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Connect to SMTP connection
LIB CONNECT TO 'SMTP';</code></pre>
<p>As with the REST connection, the connection name should be prefixed with the space name and a colon if the connection is in a managed space.</p>
<p>Then the sending of an email is simply a LOAD call, with the recipient, sender, subject and body of the email all included in the SELECT statement:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs"> // Send email and retrieve result of send
Email:
LOAD
status as [Email Status],
result as [Email Result]
;
SELECT
status,
result
FROM SendEmail
WITH PROPERTIES (
to='$(vTo)',
subject='Capacity Usage Exceeding Expected For Time Of Month ($(vRunRate))',
message='

The capacity licence usage on <b>$(vInstance)</b> is currently <b>$(vUsed)</b> minutes out of <b>$(vTotal)</b>.
This is <b>$(vPercent)</b> of the total capacity, and <b>$(vRunRate)</b> of the minutes pro-rata for the time of month.',
html='true',
fromName='$(vFromName)',
fromEmail='$(vFrom)',
cc='',
bcc=''
);</code></pre>
<p>Note that you can place HTML into the body of the message here (due to the html=&#8217;true&#8217; flag). The code above will be missing the line break and bold tags, you can simply add them back in as required.</p>
<p>The response from the email server is kept in the Email table. We are not looking into that here, but you can check the values in these fields in the Analyze part of your app.</p>
<p>We then need to end if the IF statement we started above, and clear down the variables we have used and no longer have a need of:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">end if

// Clean up after ourselves
let vInstance = ;
let vTo = ;
let vFrom = ;
let vFromName = ;
let vAPIKey = ;
let vAlertAt = ;
let vRepeatIn = ;
let vSendAll = ;</code></pre>
<p>So, all being well that should be that. Your tenant&#8217;s API will be polled, capacity usage will be loaded (note other licences are in that endpoint also, just excluded by a WHERE), run rates will be calculated and emails will be sent.</p>
<p>Seeing the data is in a Sense app though, it would be a shame not to have a chart or two&#8230;</p>
<h3>Building a Front End for the Application</h3>
<p>This application will only have one row of data in it and a handful of fields that can be used for measures. Master measures can be made for these, as follows:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeexp">Total Capacity: Sum([Total Minutes])
Used Minutes: Sum([Used Minutes])
Capacity Run Rate: Sum([Available Run Rate])
Percent of Total Used: Sum([Used Minutes]) / Sum([Total Minutes])
Percent of Run Rate Used: Sum([Used Minutes]) / Sum([Available Run Rate])</code></pre>
<p>You might then chose to place these onto a sheet a bit like this:</p>
<p><img decoding="async" class="aligncenter size-fusion-600 wp-image-1505344" src="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Qlik-Cloud-Capacity-Usage-600x388.png" alt="Qlik Cloud Capacity Usage Dashboard" width="600" height="388" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Qlik-Cloud-Capacity-Usage-200x129.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Qlik-Cloud-Capacity-Usage-300x194.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Qlik-Cloud-Capacity-Usage-400x259.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Qlik-Cloud-Capacity-Usage-600x388.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Qlik-Cloud-Capacity-Usage-768x497.png 768w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Qlik-Cloud-Capacity-Usage-800x518.png 800w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/05/Qlik-Cloud-Capacity-Usage.png 927w" sizes="(max-width: 600px) 100vw, 600px" /></p>
<p>If after all of this you would rather just download an app that already has all of the script and front end in it, then you are in luck. I have uploaded the completed app to <a href="https://community.qlik.com/">Qlik Community</a> and you can find it here:<br />
<a href="https://community.qlik.com/t5/Qlik-Sense-Documents/Qlik-Sense-App-Monitor-Capacity-Licences-on-Qlik-Cloud-and/ta-p/1805633" target="_blank" rel="noopener">https://community.qlik.com/t5/Qlik-Sense-Documents/Qlik-Sense-App-Monitor-Capacity-Licences-on-Qlik-Cloud-and/ta-p/1805633</a></p>
<p>I would be very interested to hear how you get on with this application. Please feel free to contact me via the comments if you wish to get in touch.</p>
<h3>Expanding The Solution</h3>
<p>If you want to take this solution further, and write the capacity usage as at each reload to an online source, you may want to read my next blog post also:</p>
<p><a href="https://www.quickintelligence.co.uk/ifttt-webhooks-qlik-cloud/">Use IFTTT and Webhooks to Send Data from Qlik Sense</a></p>
<p>The post <a href="https://www.quickintelligence.co.uk/sense-capacity-licence-notify/">Monitor and Notify Sense Capacity Licence Usage in Qlik Cloud</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.quickintelligence.co.uk/sense-capacity-licence-notify/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1505340</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Minified using Disk

Served from: www.quickintelligence.co.uk @ 2026-04-16 15:30:18 by W3 Total Cache
-->