<?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>Quick Intelligence Instant Sense Application Blog Posts</title>
	<atom:link href="https://www.quickintelligence.co.uk/instant-app-posts/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description></description>
	<lastBuildDate>Thu, 14 Sep 2023 09:20:46 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.6</generator>

<image>
	<url>https://www.quickintelligence.co.uk/wp-content/uploads/2017/05/cropped-QuickIntelligence_Square-32x32.png</url>
	<title>Quick Intelligence Instant Sense Application Blog Posts</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">48890870</site>	<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 fetchpriority="high" 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>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>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>Loading Data from Online CSV Sources into Qlik</title>
		<link>https://www.quickintelligence.co.uk/load-online-csv-into-qlik/</link>
					<comments>https://www.quickintelligence.co.uk/load-online-csv-into-qlik/#respond</comments>
		
		<dc:creator><![CDATA[Steve Dark]]></dc:creator>
		<pubDate>Fri, 08 Jan 2021 10:17:30 +0000</pubDate>
				<category><![CDATA[Instant App]]></category>
		<category><![CDATA[Load Script]]></category>
		<category><![CDATA[Qlik Sense Tutorials]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[qlik sense]]></category>
		<guid isPermaLink="false">https://www.quickintelligence.co.uk/?p=1505308</guid>

					<description><![CDATA[<p>There are myriad different data sources out there, and it is possible to load any of them into Qlik. Some are easier than others, sure, but there is always a way. There are good articles and posts on some of the trickier sources, but today I want to show you how you can bring in  [...]</p>
<p>The post <a href="https://www.quickintelligence.co.uk/load-online-csv-into-qlik/">Loading Data from Online CSV Sources into Qlik</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>There are myriad different data sources out there, and it is possible to load any of them into Qlik. Some are easier than others, sure, but there is always a way. There are good articles and posts on some of the trickier sources, but today I want to show you how you can bring in CSV data from GitHub. This means you can pull up to date, crowdsourced and governed data directly into your applications, just by following these simple steps.<br />
<span id="more-1505308"></span></p>
<h3>Introducing The CSV Data</h3>
<p>Recently I was asked to be involved with the <a href="https://dataonthe.earth/" target="_blank" rel="noopener noreferrer">Data On The Earth</a> project. This is an initiative to get data that can help everyone, from policy makers to concerned individuals, make more informed decisions about environmental issues. Naturally, I was very happy to help.</p>
<p><a href="https://dataonthe.earth/"><img decoding="async" class="aligncenter size-full wp-image-1505317" src="https://www.quickintelligence.co.uk/wp-content/uploads/2021/01/DataOnTheEarth.png" alt="Data On The Earth" width="550" height="96" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2021/01/DataOnTheEarth-200x35.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/01/DataOnTheEarth-300x52.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/01/DataOnTheEarth-400x70.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/01/DataOnTheEarth.png 550w" sizes="(max-width: 550px) 100vw, 550px" /></a></p>
<p>The first thing I wanted to do was to present some ideas over some data that had relevance to the job in hand. The site <a href="https://ourworldindata.org/" target="_blank" rel="noopener noreferrer">Our World In Data</a> seemed like a good place to start.</p>
<p><img decoding="async" class="alignright size-medium wp-image-1505318" src="https://www.quickintelligence.co.uk/wp-content/uploads/2021/01/OctoCatMap-300x189.png" alt="GitHub OctoCat Map" width="300" height="189" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2021/01/OctoCatMap-200x126.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/01/OctoCatMap-300x189.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/01/OctoCatMap-320x202.png 320w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/01/OctoCatMap-400x253.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/01/OctoCatMap-600x379.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2021/01/OctoCatMap.png 640w" sizes="(max-width: 300px) 100vw, 300px" />There I found data which related to Co2 emissions, hosted on <a href="https://github.com/" target="_blank" rel="noopener noreferrer">GitHub</a>, you can find more about these data <a href="https://ourworldindata.org/co2-and-other-greenhouse-gas-emissions" target="_blank" rel="noopener noreferrer">here</a>. The data are by Country and Year, so a bit of extra metadata on the countries would allow some demographic filtering. I found this in two further CSV files, also conveniently hosted on GitHub.</p>
<p>The data are not perfect, as some of the figures are not reported by all countries in every year and countries change over time. There are things that could be done to fix this up a bit (rolling forward last known figures, for instance), but I have not done that here. If you are planning to lobby a government over their emissions (or something) please check your facts and don&#8217;t rely on what is presented in these data alone!</p>
<h3>Creating a Connection</h3>
<p>The code in this article is for the load script of Qlik Sense. You can do similar with the REST connector in QlikView, but the syntax is a bit different, this post should give you pointers should you wish to build your own load script.</p>
<p>As with any load script in Sense you first need to have your connection created. Rather than create a separate connection for each data source I load I tend to create a generic connection of each type required and 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 noreferrer">WITH CONNECTION</a>. You may already have the required connection set up if you have previously followed my tutorials on <a href="https://www.quickintelligence.co.uk/sense-session-logs/" target="_blank" rel="noopener noreferrer">Loading Sense Session Logs</a> or <a href="https://www.quickintelligence.co.uk/reading-rss-feeds-with-qlik-rest-connector/" target="_blank" rel="noopener noreferrer">Loading RSS Feeds</a>, if not go to the <strong>Data Load Editor</strong> and click <strong>Create New Connection</strong>.</p>
<p>Give your connection the name <strong>GenericGET</strong> and point it to a placeholder, such as <a href="https://jsonplaceholder.typicode.com/posts" target="_blank" rel="noopener noreferrer">https://jsonplaceholder.typicode.com/posts</a>, ensure the Method is set to <strong>GET</strong> and leave everything else as defaults.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505262" src="https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/GenericGet-Connection.jpg" alt="Config screen for GenericGET connection" width="428" height="238" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/GenericGet-Connection-200x111.jpg 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/GenericGet-Connection-300x167.jpg 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/GenericGet-Connection-400x222.jpg 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/GenericGet-Connection.jpg 428w" sizes="(max-width: 428px) 100vw, 428px" /></p>
<p>Click on <strong>Test Connection</strong>, then <strong>Close</strong> and finally (if all is good) <strong>Create</strong>.</p>
<h3>Building the Load Script</h3>
<p>Now, onto building the load script. First we need to do some set up, to connect to our connection and set up some variables:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">LIB CONNECT TO 'GenericGET';

let vCompleteYears = 'Y'; // Y/N for all years or only 1990 - 2016 where data is quite complete
let vExcludeYears = if(upper(left(vCompleteYears, 1)) = 'Y', 'AND (year &gt;= 1990 AND year &lt;= 2016)', '');

set vFix = if([$1] = '', '$3', [$1]) as [$2];

let v1B = 1000000000;
let v1M = 1000000;</code></pre>
<p>The first variable allows us to turn on or off data for years which are not that complete, the second puts the code to implement that into a variable if switched on. Next we have a variable which includes parameters that we will use later on. If you have not used them before you should see this post on <a href="https://www.quickintelligence.co.uk/variables-parameters-load-script/" target="_blank" rel="noopener noreferrer">Using Parameters with Qlik Variables</a>. Finally a couple of variables to remove the risk of typing the wrong number of zeros later on.</p>
<p>Now we are set up, we can do the main part of the load.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">Emissions:
LOAD
iso_code &amp; year as CountryYear,
iso_code as [Country ISO],
country as Country,
year as Year,
co2 as CO2,
consumption_co2 as [CO2 Consumption],
trade_co2 as [CO2 Trade],
co2_per_unit_energy as [CO2 Per Unit Energy],
cement_co2 as [CO2 Cement],
coal_co2 as [CO2 Coal],
flaring_co2 as [CO2 Flaring],
gas_co2 as [CO2 Gas],
oil_co2 as [CO2 Oil],
total_ghg as [Total GHG],
methane as Methane,
nitrous_oxide as [Nitrous Oxide],
population as Population,
gdp as GDP
WHERE iso_code &lt;&gt; '' and index(iso_code, '_') = 0 // Remove rolled up values
$(vExcludeYears)
;
SQL SELECT
"iso_code",
"country",
"year",
"co2",
"consumption_co2",
"trade_co2",
"co2_per_unit_energy",
"cement_co2",
"coal_co2",
"flaring_co2",
"gas_co2",
"oil_co2",
"total_ghg",
"methane",
"nitrous_oxide",
"population",
"gdp"
FROM CSV
(header on, delimiter ",", quote """") "CSV_source"
WITH CONNECTION
(URL "https://raw.githubusercontent.com/owid/co2-data/master/owid-co2-data.csv")
;</code></pre>
<p>As with a database load this load will use the last opened connection. The <strong>CSV</strong> on the FROM line is specifying the basic format that we are loading from this connection, the exact format of the CSV is specified in the brackets &#8211; just as it would be if you were loading the CSV from a Folder Connection. The <strong>CSV_Source</strong> relates to which data source at the connection you wish to load &#8211; with a CSV this will only ever be CSV_source, but with JSON data there may be many named sets of data for you to choose from. The <strong>WITH CONNECTION</strong> then defines the URL we are loading from.</p>
<p>To explore these options further create another connection, pointing to that URL and look at the <strong>Select Data</strong> dialog for that connection.</p>
<p>Atop of the REST load we have a <a href="https://www.quickintelligence.co.uk/preceding-load-qlikview/" target="_blank" rel="noopener noreferrer">Preceding Load</a>, to tidy the fieldnames and remove data we don&#8217;t want. There are rows with data rolled up to regional levels, but we are going to do that ourselves in Qlik so need to remove the roll ups to avoid double counting. Note that when doing a <strong>WHERE</strong> in a preceding load all of the data still has to come down from the REST source first, so you may want to look if you can pass parameters to the URL you are loading from to drop some data, rather than using a WHERE statement.</p>
<p>So, that is the data we require from our main data source. We are going to continue though, and augment and categorise these data some more.</p>
<h3>Bringing in more CSV Data</h3>
<p>The next table of data is a simple table of country demographics, provided by GitHub, keyed on the ISO code for the country.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">Region:
LOAD
[ISO3166-1-Alpha-3] as [Country ISO],
$(vFix(Developed / Developing Countries, Developed, Not Known)),
$(vFix(Region Name, Region, Other)),
$(vFix(Sub-region Name, Sub Region, Other))
WHERE EXISTS ([Country ISO], [ISO3166-1-Alpha-3])
;
SQL SELECT
"ISO3166-1-Alpha-3",
"Developed / Developing Countries",
"Region Name",
"Sub-region Name"
FROM CSV (header on, delimiter ",", quote """") "CSV_source"
WITH CONNECTION
(URL "https://raw.githubusercontent.com/datasets/country-codes/master/data/country-codes.csv");</code></pre>
<p>This file has many more columns than we need, but we are cherry picking the few that we want. As you can see, the code for connecting to a CSV source is almost identical to above &#8211; just the URL is changing. In the Preceding load the <strong>vFix</strong> variable we created at the start is being used to replace any missing values with Not Known or Other. A WHERE EXISTS ensures we only get rows which relate to countries we have emissions data for.</p>
<p>Using a lookup table like this from a repository like GitHub in your Qlik apps means that your application will benefit from improvements to that dataset over time, rather than having a CSV or Excel spreadsheet languishing on your server which will never see an update.</p>
<h3>Where In The World Is That?</h3>
<p>As we are looking at country data it would be great to plot that on a map, and another GitHub source has just that information available for us. These data are provided and maintained by <a href="https://codeme.lt/" target="_blank" rel="noopener noreferrer">Tadas Tamošauskas</a> in a personal repo.</p>
<p>Here we are going to LEFT JOIN the data onto the existing region table, bringing the latitude/longitude data into the same table as the regions. You will see why in a bit.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">LEFT JOIN (Region)
LOAD
*,
GeoMakePoint(lat,long) as [Country Point]
;
LOAD
purgechar([Alpha-3 code], ' "') as [Country ISO],
purgechar([Latitude (average)], ' "') as lat,
purgechar([Longitude (average)], ' "') as long
WHERE EXISTS ([Country ISO], purgechar([Alpha-3 code], ' "'))
;
SQL SELECT
"Alpha-3 code",
"Latitude (average)",
"Longitude (average)"
FROM CSV (header on, delimiter ",", quote """") "CSV_source"
WITH CONNECTION
(URL "https://gist.githubusercontent.com/tadast/8827699/raw/f5cac3d42d16b78348610fc4ec301e9234f82821/countries_codes_and_coordinates.csv");</code></pre>
<p>This now lets us plot emissions data on a map by country. Our second data source though gave us <strong>Region</strong> and <strong>Sub Region</strong> names. It would be good if we could also plot by those regions. There is probably a data source out there which has SVG data for each region, but that could take a while to find and will not necessarily map to our existing region names.</p>
<p>We can apply a simple hack to generating points at each of the regions though.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">RegionPoint:
LOAD
Region,
GeoMakePoint(avg(lat),avg(long)) as [Region Point]
RESIDENT Region
GROUP BY Region;

SubRegionPoint:
LOAD
[Sub Region],
GeoMakePoint(avg(lat),avg(long)) as [Sub Region Point]
RESIDENT Region
GROUP BY [Sub Region];</code></pre>
<p>Here, a couple of RESIDENT loads from the existing Region table can be grouped to give one row per Region and Sub Region. For each of these rows the average latitude and average longitude can be calculated. These two values can then be changed to a point that can be easily used on a map. Note that some points may appear in the ocean, but that is the joy of using averages.</p>
<h3>Finding Latest Data and Grouping Figures</h3>
<p>The figures from our initial dataset are great for trending over time as they are provided on an annual basis. They are not so great for categorical data and providing filters though, as a country could move from one bucket to another year to year. For these filters we only want to use the latest figures. Here we hit another minor snag though, in that the last year in which data is available differs by country.</p>
<p>We can deal with this by finding the latest year for each country, using a RESIDENT, GROUP BY and MAX to create a composite key.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">LatestPop:
LOAD
[Country ISO] &amp; Year as LatestPop
;
LOAD
[Country ISO],
max(Year) as Year
RESIDENT Emissions
WHERE Population &lt;&gt; ''
GROUP BY [Country ISO];</code></pre>
<p>That composite key can then be used in the WHERE EXISTS of a subsequent RESIDENT load to only bring the latest data.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">Population:
LOAD
Country,
Population as [Population Latest],
dual(num(Round(Population, 100000) / $(v1M), '#,##0.0') &amp; 'M', Round(Population, 100000)) as [Population 100K],
dual(num(Round(Population, $(v1M)) / $(v1M), '#,##0') &amp; 'M', Round(Population, $(v1M))) as [Population 1M],
dual(num(Round(Population, $(v1M)0) / $(v1M), '#,##0') &amp; 'M', Round(Population, $(v1M)0)) as [Population 10M]
RESIDENT Emissions
WHERE EXISTS (LatestPop, CountryYear);</code></pre>
<p>This is a useful technique, and one I use frequently in live projects. As well as getting the exact number for the latest year for each country we can also put things into buckets. This can be done with a massive IF statement or for equal buckets an aggregation. Here I have used a <strong>Round</strong> statement, but you could use a <strong>Floor</strong> or <strong>Ceil</strong> if you prefer. The <a href="https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/round.htm" target="_blank" rel="noopener noreferrer">Round</a> function in Qlik is more flexible than in most languages as, rather than just rounding to a number of decimal places, you can specify what grouping you wish to go to, whether that is more or less than one.</p>
<p>The same technique can then be used for GDP, then there is just a little bit of housekeeping to do at the end of our script.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">LatestGDP:
LOAD
[Country ISO] &amp; Year as LatestGDP
;
LOAD
[Country ISO],
max(Year) as Year
RESIDENT Emissions
WHERE GDP &lt;&gt; ''
GROUP BY [Country ISO];

GDP:
LOAD
Country,
GDP as [GDP Latest],
dual(num(Round(GDP, $(v1B)), '#,##0') / $(v1B) &amp; 'B', Round(GDP, $(v1B))) as [GDP 1B],
dual(num(Round(GDP, $(v1B)0), '#,##0') / $(v1B) &amp; 'B', Round(GDP, $(v1B)0)) as [GDP 10B],
dual(num(Round(GDP, $(v1B)00), '#,##0') / $(v1B) &amp; 'B', Round(GDP, $(v1B)00)) as [GDP 100B]
RESIDENT Emissions
WHERE EXISTS (LatestGDP, CountryYear);

DROP FIELDS lat, long, LatestPop, LatestGDP;</code></pre>
<p>So, that is it. Put all those bits of script together and you should have a working load script to bring in emissions and demographic data from three separate online CSV sources.</p>
<p>Now you just need a quick way to analyse those data. Fortunately we have your back there.</p>
<h3>Viewing The Data In The Instant Sense Application</h3>
<p>To make it quick for us at Quick Intelligence to produce Proof Of Concepts for potential clients I created the Instant Sense Application. This application allows you to load any data source, and a spreadsheet of metadata about that data source, and then explore the data over twelve sheets of user configurable visualisations and tables.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505265" src="https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/Instant-Sense-Application-Thumbs-Blog.jpg" alt="Instant Sense Application Thumbs Blog" width="600" height="240" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/Instant-Sense-Application-Thumbs-Blog-200x80.jpg 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/Instant-Sense-Application-Thumbs-Blog-300x120.jpg 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/Instant-Sense-Application-Thumbs-Blog-400x160.jpg 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/Instant-Sense-Application-Thumbs-Blog.jpg 600w" sizes="(max-width: 600px) 100vw, 600px" /></p>
<p>We have made this application available to all, at no cost, to make it quick and easy for others to showcase what Qlik Sense is capable of.</p>
<p>The application can be downloaded from here:</p>
<p><a href="https://www.quickintelligence.co.uk/instant-qlik-sense-app/" target="_blank" rel="noopener noreferrer">The Quick Intelligence Instant Sense Application</a></p>
<p>Details of how the application has been built can be found here:</p>
<p><a href="https://www.quickintelligence.co.uk/instant-qlik-sense-application/" target="_blank" rel="noopener noreferrer">How To Build A User Configurable Sense Application</a></p>
<p>If you already have the application, or if you just want the script above, you can download the script and meta-data here:</p>
<p><a href="https://www.quickintelligence.co.uk/isa/emissions.zip" target="_blank" rel="noopener noreferrer">Global Emissions Data By Year with Metadata</a></p>
<p>If you use the application and build more expressions that you feel will be useful for others, please share them in the comments below. As ever, I&#8217;m happy to receive questions and comments from readers, and will get back to these as soon as I am able.</p>
<p>The post <a href="https://www.quickintelligence.co.uk/load-online-csv-into-qlik/">Loading Data from Online CSV Sources into Qlik</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.quickintelligence.co.uk/load-online-csv-into-qlik/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1505308</post-id>	</item>
		<item>
		<title>Analysing Sense Session Logs</title>
		<link>https://www.quickintelligence.co.uk/sense-session-logs/</link>
					<comments>https://www.quickintelligence.co.uk/sense-session-logs/#comments</comments>
		
		<dc:creator><![CDATA[Steve Dark]]></dc:creator>
		<pubDate>Thu, 20 Aug 2020 18:38:04 +0000</pubDate>
				<category><![CDATA[Instant App]]></category>
		<category><![CDATA[Qlik Sense Tutorials]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Sense]]></category>
		<category><![CDATA[session logs]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.quickintelligence.co.uk/?p=1505281</guid>

					<description><![CDATA[<p>There are a number of monitoring apps that ship with Qlik Sense Enterprise on Premise, some of which you need to upload to your site. All of these are black-boxes to an extent though. What if you want to build your own analysis over the Sense log files? Well, this blog post has you covered.  [...]</p>
<p>The post <a href="https://www.quickintelligence.co.uk/sense-session-logs/">Analysing Sense Session Logs</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>There are a number of monitoring apps that ship with Qlik Sense Enterprise on Premise, some of which you need to upload to your site. All of these are black-boxes to an extent though. What if you want to build your own analysis over the Sense log files? Well, this blog post has you covered.<br />
<span id="more-1505281"></span></p>
<h3>Logging on Qlik Sense Enterprise</h3>
<p>With the default settings on logs in Sense Enterprise get written to two locations. One for the log file currently being written to and then an archive, where the current log is moved to periodically. By loading from both of those sources you get a good picture of what is going on with usage on your site. Connections are created to these two locations, named <strong>ServerLogFolder</strong> and <strong>ArchivedLogsFolder</strong>. There is a reasonable chance that you won&#8217;t see these connections in the Load Script Editor, so you will need to first go into the QMC and grant yourself rights &#8211; be careful not to grant more rights than you intend to when doing this!</p>
<p>Once you have access to these connections you can dig around and find out quite a lot about your system and how it is performing. This post, however, just focuses on the most important information. Who has done what and when.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505282" src="https://www.quickintelligence.co.uk/wp-content/uploads/2020/08/Qlik-Session-Stats.jpg" alt="Qlik Session Stats" width="1209" height="704" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2020/08/Qlik-Session-Stats-200x116.jpg 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/08/Qlik-Session-Stats-300x175.jpg 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/08/Qlik-Session-Stats-400x233.jpg 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/08/Qlik-Session-Stats-600x349.jpg 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/08/Qlik-Session-Stats-768x447.jpg 768w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/08/Qlik-Session-Stats-800x466.jpg 800w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/08/Qlik-Session-Stats-1024x596.jpg 1024w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/08/Qlik-Session-Stats-1200x699.jpg 1200w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/08/Qlik-Session-Stats.jpg 1209w" sizes="(max-width: 1209px) 100vw, 1209px" /></p>
<h3>Sense Session Log Load Script</h3>
<p>Once you have permissions to the connections set up you can enter the <strong>Data Load Editor</strong> and start building your script.</p>
<p>First you need to set a couple of variables, which form part of the path to the session files. The first of these is generally the machine name, so can be left as is. The second tends to be a combination of the machine name and the local domain. You will need to click on the <strong>Select Data</strong> button underneath the connection name to confirm the path if its not what is expected.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Set variables which identify this server and form part of the log names
// Check in the ServerLogFolder and ArchivedLogsFolder to find the values for your installation
let vServerName = ComputerName();
let vFullServerName = 'servername.domain.local'; // Usually FQDN</code></pre>
<p>The next set of variables are then constructed from the connection name (which is usually the same in each installation) and the two variables you set above.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Build out file paths and file masks based on the variables above
let vCurLog = 'lib://ServerLogFolder/';
let vLogFolder = 'lib://ArchivedLogsFolder/$(vFullServerName)/';
let vCurFile = '$(vCurLog)Engine/Trace/$(vServerName)_Session_Engine.txt';
let vArchiveFiles = '$(vLogFolder)Engine/Trace/$(vServerName)_Session_Engine_*.log';</code></pre>
<p>As you would expect, there are a number of dates in the log file. Because the log is in a text file, rather than a database table, the dates are in plain text. This means they each need to be converted to dual-datatype dates so they can be used. The code for each of the conversions would need to be repeated, so here is a parameterised variable to do the job. If you have not used variables with parameters before you may want to see this <a href="https://www.quickintelligence.co.uk/variables-parameters-load-script/">previous blog post</a>.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Create parameterised variables for repeated tasks
set vDT = Date(Date#(left(replace($1, 'T', ' '), 15), 'YYYYMMDD hhmmss'), 'DD MMM YYYY hh:mm:ss');</code></pre>
<p>The filename for the current log file has been built into a variable. Just in case we are between log files at this point we are going to check first that it exists. If it does we can bring the fields that we want from the file. If you are a completest you may want to look to the source file and bring through the fields I have dropped. This is pretty much everything that is interesting though.</p>
<p>Note that I am excluding sessions relating to reloads by the Sense Distribution service. If you are looking for log-jams on CPU use at specific times of day you may want to include these rows, but for most analysis they are not useful.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Load the raw data from the current file
if alt(FileSize('$(vCurFile)'), 0) &gt; 0 then
Temp_Sessions:
LOAD
ActiveUserId,
[App Title],
[Session Start],
[Exit Reason],
Level,
Hostname,
ServiceUser,
ActiveUserDirectory,
Timestamp,
[Exe Version],
[Server Started],
AppId,
[Doc Timestamp],
[Authenticated User],
[Secure Protocol],
[Session Duration],
[CPU Spent (s)],
[Bytes Received],
[Bytes Sent],
Calls,
Selections
FROM [$(vCurFile)]
(txt, utf8, embedded labels, delimiter is '\t', msq)
// Ignoring reload sessions. Remove next line if you want all sessions
WHERE ActiveUserId &lt;&gt; 'sa_scheduler' and ActiveUserId &lt;&gt; 'sa_repository'
;
end if</code></pre>
<p>For the archive log files we need to enumerate around all of the files in the archive folder. Again, we already have the file-mask in a variable, so can just use this. You may be aware that a load can be done directly from a filename with an asterisk in it, to load all matching files. Personally, I would always use a <strong><a href="https://help.qlik.com/en-US/sense/June2020/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptControlStatements/For%20Each.htm" target="_blank" rel="noopener noreferrer">for each</a></strong> loop, as it makes debugging and testing easier. You can also exclude files (such as files with a tilde when loading Excel files) and work with the <strong><a href="https://help.qlik.com/en-US/sense/June2020/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptPrefixes/crosstable.htm" target="_blank" rel="noopener noreferrer">CROSSTABLE</a></strong> statement, which fails when used with an asterisk in the file name.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Concatenate onto the temporary table the raw data from all of the archive files
// Strongly suggest building an archive of QVD files for historical logs and
// concatenate these at the end of the process - this is not done in this example though
for each vFile in FileList('$(vArchiveFiles)')
Temp_Sessions:
LOAD
ActiveUserId,
[App Title],
[Session Start],
[Exit Reason],
Level,
Hostname,
ServiceUser,
ActiveUserDirectory,
Timestamp,
[Exe Version],
[Server Started],
AppId,
[Doc Timestamp],
[Authenticated User],
[Secure Protocol],
[Session Duration],
[CPU Spent (s)],
[Bytes Received],
[Bytes Sent],
Calls,
Selections
FROM [$(vFile)]
(txt, utf8, embedded labels, delimiter is '\t', msq)
// Ignoring reload sessions. Remove next line if you want all sessions
WHERE ActiveUserId &lt;&gt; 'sa_scheduler' and ActiveUserId &lt;&gt; 'sa_repository'
;
next</code></pre>
<p>You should now have a single table with all of the log entries that are needed for analysis. There are a number of transformations and general tidying up that is required. This is done by doing a <strong><a href="https://help.qlik.com/en-US/sense/June2020/Subsystems/Hub/Content/Sense_Hub/Scripting/load-data-from-previously-loaded-table.htm" target="_blank" rel="noopener noreferrer">RESIDENT</a></strong> load from our raw-data temporary table.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Format all raw values, calculate new values and rename fields
Sessions:
LOAD
1 as SessionCount,
*,
Date(DayStart([Session Start]), 'DD MMM YYYY') as Date,
Date(MonthStart([Session Start]), 'MMM YYYY') as Month,
Year([Session Start]) as Year,
Month([Session Start]) as [Month Name],
Hour([Session Start]) as Hour,
WeekDay([Session Start]) as Day,
Time(Round(
[Session Start] - DayStart([Session Start]),
(1/288)), 'hh:mm') as Time, // nearest 5min
Floor([Session Start] - [Server Started]) as [Days Since Server Start],
Floor(([Session End] - [Document Reloaded]) * 24) as [Hours Since Document Reload],
Round([Bytes Received] * 1024, 1) as [KB Received],
Round([Bytes Sent] * 1024, 1) as [KB Sent]
;
LOAD
ActiveUserId as User,
[App Title] as Application,
$(vDT([Session Start])) as [Session Start],
[Exit Reason],
Level,
Hostname,
ServiceUser as [Service User],
ActiveUserDirectory as [User Directory],
$(vDT(Timestamp)) as [Session End],
[Exe Version] as [Server Version],
$(vDT([Server Started])) as [Server Started],
AppId,
$(vDT([Doc Timestamp])) as [Document Reloaded],
[Authenticated User],
[Secure Protocol],
rangemin([Session Duration], 0.5) as [Session Duration], // clip as error can cause incorrect duration
[CPU Spent (s)],
[Bytes Received],
[Bytes Sent],
Calls,
Selections
RESIDENT Temp_Sessions
;</code></pre>
<p>There&#8217;s quite a bit going on in the script above, so to take it one bit at a time&#8230; Field names are being renamed to make them more &#8216;friendly&#8217; for end-users. The date variable created above is being applied to all date fields. I found the session duration occasionally has duff values (if a session looks to be resumed), so those are capped at 12 hours. A number of new fields are added in the preceding load, including a counter (something I always to to make things more efficient), all of the date parts and some derived values for further calculations.</p>
<p>As should always be done at the end of load scripts, there is then some tidying up of tables and variables to do.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Drop the temporary table
DROP TABLE Temp_Sessions;

// Clean up all the variables we have used
let vServerName = ;
let vFullServerName = ;
let vCurLog = ;
let vLogFolder = ;
let vCurFile = ;
let vArchiveFiles = ;
let vCurFile = ;
let vFile = ;</code></pre>
<p>And there you have it. Your Sense Enterprise log file, loaded, cleaned and ready to analyse.</p>
<h3>So, How Do I Analyse My Sense Logs?</h3>
<p>Obviously, you can build your own charts and tables over these data, but wouldn&#8217;t it be simpler if there was a pre-canned dashboard you could use? Well, we have your back on that one. Our <strong><a href="https://www.quickintelligence.co.uk/isa" target="_blank" rel="noopener noreferrer">Instant Sense Application</a></strong> can load any data-set and some metadata about those data and then presents it in a user-configurable dashboard. There is a short video of me presenting the application on YouTube, here: <a href="https://www.youtube.com/watch?v=jN3Vj93v9x4" target="_blank" rel="noopener noreferrer">https://www.youtube.com/watch?v=jN3Vj93v9x4</a>.</p>
<p>The application is driven by a spreadsheet which defines the fields to be used for dimensions (in filters, charts and tables) and also the measures to calculate over those dimensions.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505285" src="https://www.quickintelligence.co.uk/wp-content/uploads/2020/08/Qlik-Session-Expressions.jpg" alt="Qlik Session Analyser Measures" width="701" height="247" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2020/08/Qlik-Session-Expressions-200x70.jpg 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/08/Qlik-Session-Expressions-300x106.jpg 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/08/Qlik-Session-Expressions-400x141.jpg 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/08/Qlik-Session-Expressions-600x211.jpg 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/08/Qlik-Session-Expressions.jpg 701w" sizes="(max-width: 701px) 100vw, 701px" /></p>
<p>If you already have the latest version of the <strong>Instant Sense Application</strong> you can simply download the zip file with the load script and metadata spreadsheet from here:</p>
<p><a href="https://www.quickintelligence.co.uk/SenseSessions.zip" target="_blank" rel="noopener noreferrer">https://www.quickintelligence.co.uk/SenseSessions.zip</a></p>
<p>If you have yet to download the app you can do so for free from here:</p>
<p><a href="https://www.quickintelligence.co.uk/isa" target="_blank" rel="noopener noreferrer">https://www.quickintelligence.co.uk/isa</a></p>
<p>Once you have downloaded the app you will need to upload it to your Sense server (via the QMC). At this point you can rename it to <strong>Sense Session Logs</strong> or similar. Open the app in your Work area and go to the <strong>data load editor</strong>. Now find the <strong>SenseSesssions</strong> folder under <strong>DataSets</strong> in the zip file. Open the load script text file and copy and paste the script over the script in the <strong>Main Data</strong> section of the load script. The <strong>SessionLogLookups.xlsx</strong> file needs to be copied to a folder you have a connection to in Sense, and then the past to that needs to be set in the variable on the <strong>Main</strong> sheet of the load script.</p>
<p>Once this has been done it should just be a case of reloading and you have your Sense Session Log Analyser.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505290" src="https://www.quickintelligence.co.uk/wp-content/uploads/2020/08/Qlik-Sense-Application-Stats.jpg" alt="Qlik Sense Application Stats" width="670" height="361" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2020/08/Qlik-Sense-Application-Stats-200x108.jpg 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/08/Qlik-Sense-Application-Stats-300x162.jpg 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/08/Qlik-Sense-Application-Stats-400x216.jpg 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/08/Qlik-Sense-Application-Stats-600x323.jpg 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/08/Qlik-Sense-Application-Stats.jpg 670w" sizes="(max-width: 670px) 100vw, 670px" /></p>
<p>There are a number of other example scripts included with the Instant Sense Application which you might like to explore. If you are interested in how the application was built, that is all explained in one of our <a href="https://www.quickintelligence.co.uk/instant-qlik-sense-application/">previous blog posts</a>.</p>
<p>If you have any comments or suggestions related to this post please post in the comments below.</p>
<p>The post <a href="https://www.quickintelligence.co.uk/sense-session-logs/">Analysing Sense Session Logs</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.quickintelligence.co.uk/sense-session-logs/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1505281</post-id>	</item>
		<item>
		<title>Reading RSS Feeds with Qlik REST Connector</title>
		<link>https://www.quickintelligence.co.uk/reading-rss-feeds-with-qlik-rest-connector/</link>
					<comments>https://www.quickintelligence.co.uk/reading-rss-feeds-with-qlik-rest-connector/#comments</comments>
		
		<dc:creator><![CDATA[Steve Dark]]></dc:creator>
		<pubDate>Wed, 15 Jul 2020 15:49:11 +0000</pubDate>
				<category><![CDATA[Instant App]]></category>
		<category><![CDATA[Qlik Sense Tutorials]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.quickintelligence.co.uk/?p=1505261</guid>

					<description><![CDATA[<p>Qlik Sense can consume data from just about any data source and present it visually. One rich source of data you may not have considered though is the RSS feed for a blog. This can, however, be loaded by Sense just like any other source. This blog post describes how and gives the code for  [...]</p>
<p>The post <a href="https://www.quickintelligence.co.uk/reading-rss-feeds-with-qlik-rest-connector/">Reading RSS Feeds with Qlik REST Connector</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Qlik Sense can consume data from just about any data source and present it visually. One rich source of data you may not have considered though is the RSS feed for a blog. This can, however, be loaded by Sense just like any other source. This blog post describes how and gives the code for reading from WordPress (and perhaps other) RSS feeds.<br />
<span id="more-1505261"></span></p>
<h3>Why Load Data From RSS Feeds?</h3>
<p><img decoding="async" class="alignright size-medium wp-image-1505270" src="https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/WP-RSS-Into-Qlik-300x190.jpg" alt="WP RSS Into Qlik" width="300" height="190" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/WP-RSS-Into-Qlik-200x126.jpg 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/WP-RSS-Into-Qlik-300x190.jpg 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/WP-RSS-Into-Qlik-320x202.jpg 320w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/WP-RSS-Into-Qlik-400x253.jpg 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/WP-RSS-Into-Qlik-600x379.jpg 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/WP-RSS-Into-Qlik-700x441.jpg 700w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/WP-RSS-Into-Qlik.jpg 750w" sizes="(max-width: 300px) 100vw, 300px" />The answer to that question is entirely up to you.</p>
<p>For me though it was purely to provide an example data set. Recently I made available my <a href="https://www.quickintelligence.co.uk/isa" target="_blank" rel="noopener noreferrer">Instant Sense Application</a>, which can load any data set and some simple metadata about those data and provide a user configurable application. Along with the application I wanted to provide some example data feeds, and loading details of 2,000+ blog posts from <a href="https://askqv.com/" target="_blank" rel="noopener noreferrer">AskQV.com</a> seemed like a nice example. I then set about seeing whether this would work.</p>
<p>If you want to know more about what the Instant Sense Application is and, how it has been built, you will want to see my <a href="https://www.quickintelligence.co.uk/instant-qlik-sense-application/" target="_blank" rel="noopener noreferrer">previous blog post</a>, which is on that very topic.</p>
<h3>Setting Up A REST Connection</h3>
<p>In Sense we can&#8217;t just type a URL straight into our load script and pull data from it. We need to create a connection which is then available as a library. Out of the box it is required that we have a different connection for each REST endpoint, and paging is a problem. That is why the <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 noreferrer">WITH CONNECTION</a> statement was introduced. This allows us to inject changes to our REST connection at run time. It&#8217;s worth creating a new connection when connecting to a new source, but you only want to have two REST connections on your production Sense server which you can then re-purpose. The reason it&#8217;s two connections is that you can not change the GET and PUT settings using WITH CONNECTION.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505262" src="https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/GenericGet-Connection.jpg" alt="Config screen for GenericGET connection" width="428" height="238" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/GenericGet-Connection-200x111.jpg 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/GenericGet-Connection-300x167.jpg 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/GenericGet-Connection-400x222.jpg 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/GenericGet-Connection.jpg 428w" sizes="(max-width: 428px) 100vw, 428px" /></p>
<p>I always create a connection called <strong>GenericGET</strong> and point it to <a href="https://jsonplaceholder.typicode.com/posts" target="_blank" rel="noopener noreferrer">https://jsonplaceholder.typicode.com/posts</a>. The type is set to GET and everything else is left as defaults.</p>
<p>The first part of our code is to connect to that libary:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Connect to our generic REST connection
LIB CONNECT TO 'GenericGET';</code></pre>
<h3>Configuring Blog Sources</h3>
<p>Now we have a REST connector we need to tell Sense where we want to get data from. Often I use a temporary INLINE table for this kind of purpose. In this instance though I am using the table as part of the end data model, so there are a couple more fields as part of this INLINE load. Obviously you can change the sources, and/or use a different data source such as a spreadsheet:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Provide a list of blogs that you wish to load information from
Blogs:
LOAD
1 as BlogCount,
[Blog URL],
[Blog Name],
[Blog Title]
INLINE [
Blog URL,Blog Name,Blog Title
https://www.quickintelligence.co.uk/,Quick Intelligence,The Quick Intelligence Blog
https://qlikshow.com/,QlikShow,Patrick Tehubijuluw
https://dataonthe.rocks/,Data On The Rocks,Data On The Rocks
https://qlikfreak.wordpress.com/,Qlik Freak,Useful Qlik Resources
];</code></pre>
<p>You can add any number of sources, but it is imperative that they all share the same RSS structure. As mentioned above, all these are WordPress blogs so the RSS is common.</p>
<p>The next thing we need to do is loop around each of these. This is a pretty standard technique for enumerating around data once you have it in a table. To get the values we need from the table we use the <a href="https://help.qlik.com/en-US/sense/June2020/Subsystems/Hub/Content/Sense_Hub/Scripting/InterRecordFunctions/Peek.htm" target="_blank" rel="noopener noreferrer">PEEK</a> statement.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Loop around each of these feeds
for iBlog = 0 to NoOfRows('Blogs') - 1

// Grab the URL of the next blog
let sWPSite = peek('Blog URL', iBlog, 'Blogs');</code></pre>
<h3>Getting on the Right Page</h3>
<p>It seems that WordPress RSS feeds always serve up ten pages at a time. Some may vary, but that is what I have noted. This is then used for the control of the paging of our load. We will keep loading from the RSS feed, from newest to oldest posts, until we get fewer than ten pages returned. That will tell us we are on the last page. If the number of posts is divisible by ten that logic will not work, and though it pains me to do so I have put an <a href="https://help.qlik.com/en-US/sense/June2020/Subsystems/Hub/Content/Sense_Hub/Scripting/ErrorVariables/ErrorMode.htm" target="_blank" rel="noopener noreferrer">ERRORMODE</a> statement in here (rather than pulling the number of posts from the RSS header and using that).</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Set some paging variables
let iDone = 0;
let iPage = 1;

// And loop for each page - the 500 is a back-stop increase this if you need
do while iDone = 0 and iPage &lt;= 500;

// Set the paging URL - asking for paged=1 fails
let sPage = if(iPage = 1, '', '?paged=$(iPage)');

// Cheeky error mode setting - if number of posts is divisible by 10 (the default page size) a crash can occur
set errormode = 0;</code></pre>
<p>Note also here that we are setting a variable which contains nothing for page one, but has the <strong>paged=n</strong> value for all subsequent pages. The WordPress RSS does a redirect if you request page one, and that freaks out the REST connector.</p>
<p>Some RSS feeds may not require paging at all. For instance, the AskQV.com aggregated RSS feed (and many others I have looked at) just serve up all posts in one long feed.</p>
<h3>Fetch the RSS</h3>
<p>This is the part which is going to vary the most, depending on the feed that you are pulling. As already mentioned this code is good for quite a lot of blogs, but not all of them. Create a new REST connection with the specific endpoint in to have Sense generate some code for you. Make sure you only tick the fields that you are interested to try and slim that down a bit. The code that comes back from the REST connector when you use the wizard is always ugly. Make sure you tidy it up a bit after the load. In this case we are only pulling one level of data, so the keys are all irrelevant.</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Pull the raw data from the feed
RawData:
SQL SELECT
"__KEY_rss",
(SELECT
"__KEY_channel",
"__FK_channel",
(SELECT
"title" AS "title_u0",
"link" AS "link_u0",
"creator",
"pubDate",
"description",
// "encoded",
// "commentRss",
"__KEY_item",
"__FK_item"
FROM "item" PK "__KEY_item" FK "__FK_item")
FROM "channel" PK "__KEY_channel" FK "__FK_channel")
FROM XML "rss" PK "__KEY_rss"
WITH CONNECTION
(
URL "$(sWPSite)feed/$(sPage)"
);

set errormode = 1;</code></pre>
<p>Note that the ERRORMODE has gone back to reporting errors was at the end of each RSS load. Other failures will notify the user and cause the load to stop.</p>
<h3>Formatting the Data</h3>
<p>Now we just have to tidy up the data that we have received. As it is coming to us in XML format everything is in plain text. This means that the date and time field is only a string, which needs to be converted to a dual value. We also want different date break downs. In order to have a little more to analyse some other values are derived from the data. All relatively straight forward:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Tidy up the load of fields for the current page
BlogPosts:
LOAD
*,
Date(DayStart([Date Time]), 'DD MMM YYYY') as Date,
Date(MonthStart([Date Time]), 'MMM YYYY') as Month,
Year([Date Time]) as Year,
Month([Date Time]) as [Month Name],
WeekDay([Date Time]) as Day,
Hour([Date Time]) as Hour,
Time(
Round(([Date Time]-Floor([Date Time])),(1/24/4)),
'hh:mm') as Time, // to nearest 15 minutes
today() - DayStart([Date Time]) as [Days Ago],
len([Post Title]) as [Title Length]
;
LOAD
1 as PostCount,
'$(sWPSite)' as [Blog URL],
[title_u0] as [Post Title],
[link_u0] as [Post URL],
[creator] as [Post Author],
Date(Date#(mid(pubDate, 6, 17),
'DD MMM YYYY hh:mm'), 'DD MMM YYYY hh:mm') as [Date Time],
[description] as Description //,
// [encoded] as [Full Text],
// [commentRss] as [Comment Feed]
RESIDENT RawData
WHERE NOT IsNull([__FK_item]);</code></pre>
<p>I&#8217;m sure that there are further things which can be derived, but this gave me enough for my purposes. Notice that I have commented out the load of the full text of the blog post. This would give plenty of detail for searching, but is not helpful for analysis. The <strong>commentRss</strong> value gives an endpoint for all of the comments on the given post. You can craft code to go off and get those as well, if you feel so inclined.</p>
<h3>Finishing Up</h3>
<p>There are a few bits of tidying up to do at the end of our script. Finishing off the loop for each of the pages and also the loop for each of the blogs. Finally, because we are good tidy coders, there is clearing out the variables we have created along the way:</p>
<pre class="qlik-highlight-pre"><code class="qlik-highlight-codeqvs">// Check if we need another page and clean up
let iDone = if(alt(NoOfRows('RawData'), 0) &lt; 10, 1, iDone);
let iPage = iPage + 1;
DROP TABLE RawData;
loop

// End loop of blogs
next

// Tidy up behind ourselves
let iBlog = ;
let sPage = ;
let iDone = ;
let iPage = ;</code></pre>
<p>So, there you have it, all you need to load details of all the posts from your favourite blogs into Sense.</p>
<h3>Visualising the Results</h3>
<p>Once you have the data in Sense you can obviously start building your own charts and tables over those data. Another approach though is to leverage our <a href="https://www.quickintelligence.co.uk/isa" target="_blank" rel="noopener noreferrer">Instant Sense Application</a>. Included in this free download is the load script above and a metadata definition file which populates the application with all the measures and dimensions to allow you to visualise these data.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505265" src="https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/Instant-Sense-Application-Thumbs-Blog.jpg" alt="Instant Sense Application Thumbs Blog" width="600" height="240" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/Instant-Sense-Application-Thumbs-Blog-200x80.jpg 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/Instant-Sense-Application-Thumbs-Blog-300x120.jpg 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/Instant-Sense-Application-Thumbs-Blog-400x160.jpg 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/07/Instant-Sense-Application-Thumbs-Blog.jpg 600w" sizes="(max-width: 600px) 100vw, 600px" /></p>
<p>If you would like to try the application, please go to <a href="https://www.quickintelligence.co.uk/isa" target="_blank" rel="noopener noreferrer">https://www.quickintelligence.co.uk/isa</a> and fill in the form. There is also a video there which demonstrates its use.</p>
<p>Also included with the download are load scripts which demonstrate the use of open APIs (<a href="https://kidsindata.com/" target="_blank" rel="noopener noreferrer">Kids in Data</a> and <a href="https://magicthegathering.io/" target="_blank" rel="noopener noreferrer">Magic The Gathering</a>), Qlik Cloud Connectors (Twitter) and another RSS load (AskQV). Further data sources will be added over time &#8211; if you have a suggestion for one you would like to see please use the comments below.</p>
<p>The post <a href="https://www.quickintelligence.co.uk/reading-rss-feeds-with-qlik-rest-connector/">Reading RSS Feeds with Qlik REST Connector</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.quickintelligence.co.uk/reading-rss-feeds-with-qlik-rest-connector/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1505261</post-id>	</item>
		<item>
		<title>Instant Qlik Sense Application</title>
		<link>https://www.quickintelligence.co.uk/instant-qlik-sense-application/</link>
					<comments>https://www.quickintelligence.co.uk/instant-qlik-sense-application/#respond</comments>
		
		<dc:creator><![CDATA[Steve Dark]]></dc:creator>
		<pubDate>Mon, 22 Jun 2020 10:27:06 +0000</pubDate>
				<category><![CDATA[Instant App]]></category>
		<category><![CDATA[Qlik Sense]]></category>
		<category><![CDATA[Qlik Sense Tutorials]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[instant]]></category>
		<category><![CDATA[Sense]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.quickintelligence.co.uk/?p=1505236</guid>

					<description><![CDATA[<p>Over the years I’ve gathered a number of bits of code that I have reused, across both QlikView and Sense. Something that is always helpful is allowing users to pick expressions and/or dimensions in their applications. Recently I decided to pull the most useful techniques into a single app, which you can download and use.  [...]</p>
<p>The post <a href="https://www.quickintelligence.co.uk/instant-qlik-sense-application/">Instant Qlik Sense Application</a> appeared first on <a href="https://www.quickintelligence.co.uk"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Over the years I&#8217;ve gathered a number of bits of code that I have reused, across both QlikView and Sense. Something that is always helpful is allowing users to pick expressions and/or dimensions in their applications. Recently I decided to pull the most useful techniques into a single app, which you can download and use. This post introduces the QI Instant Sense Application and describes a bit about how it works.<br />
<span id="more-1505236"></span></p>
<h3>Why Create an Instant Sense Application?</h3>
<p>In my time as a Qlik developer, I have seen many attempts at a one-size-fits-all application, where you simply load different data into the one application shell and off you go. To my mind, this is never going to deliver an application that works for the people who use it. A great application can only be created when the user is carefully consulted and involved in the design.</p>
<p>Something that we perform frequently at Quick Intelligence is &#8220;Seeing Is Believing&#8221; type Proof of Concepts. This is where we take a set of data from a prospect, then show them an application back within a few hours. Sense makes this achievable because of how quick charts can be built. However, there is a lot of repetition and copy and paste to create an app which ultimately will (or at least, should) be superseded. This was the main driver behind building the <a href="https://www.quickintelligence.co.uk/instant-qlik-sense-app/">Instant Sense Application</a>.</p>
<h3>What Does The Application Do?</h3>
<p>The idea is that the template app has twelve sheets, each with different ways of viewing the data. These follow the DAR principle (Dashboard, Analysis, Reporting) with KPIs up front, breakdown of those numbers in charts, and then finally tables of data. An overview of the various sheets is shown here.</p>
<p><a href="https://www.quickintelligence.co.uk/wp-content/uploads/2020/06/Instant-Sense-Application-Sheets.png"><img decoding="async" class="aligncenter size-full wp-image-1505237" src="https://www.quickintelligence.co.uk/wp-content/uploads/2020/06/Instant-Sense-Application-Sheets.png" alt="" width="931" height="447" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2020/06/Instant-Sense-Application-Sheets-200x96.png 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/06/Instant-Sense-Application-Sheets-300x144.png 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/06/Instant-Sense-Application-Sheets-400x192.png 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/06/Instant-Sense-Application-Sheets-600x288.png 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/06/Instant-Sense-Application-Sheets-768x369.png 768w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/06/Instant-Sense-Application-Sheets-800x384.png 800w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/06/Instant-Sense-Application-Sheets.png 931w" sizes="(max-width: 931px) 100vw, 931px" /></a></p>
<p>Any data can be loaded into this template by taking a copy of the app and modifying the load script. One issue, usually, with doing this is that the objects in the app will not relate to the data that has just been loaded. This app, however, also loads in metadata from a spreadsheet, which defines which fields in the data model are used as different types of dimensions (main, trend, pivot, and geographic) and then a list of expressions that can be done of the loaded data is also included in the spreadsheet, along with how each expression should be displayed.</p>
<p>When the application is reloaded, the filters and charts pick up the meta-data and all of the chart objects work. More than that though, the user can then select which dimensions and measures they want to see and flex the application even after reload.</p>
<p>I&#8217;ve produced a short video showing both how the application is used and how the metadata spreadsheet drives how the application looks and behaves.</p>
<div class="fusion-video fusion-youtube fusion-aligncenter" style="--awb-max-width:600px;--awb-max-height:338px;--awb-width:100%;"><div class="video-shortcode"><div class="fluid-width-video-wrapper" style="padding-top:56.33%;" ><iframe title="YouTube video player 1" src="https://www.youtube.com/embed/jN3Vj93v9x4?wmode=transparent&autoplay=0&amp;rel=0" width="600" height="338" allowfullscreen allow="autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture;"></iframe></div></div></div>
<h3>So, How Does it Work?</h3>
<p>If you are a regular reader of this blog, you will know that I try to share tutorials on how to build solutions. Whilst you can just download the Instant Sense App and go, I wanted to give some detail on how it has been constructed. The truth is, though, that most of the techniques used in putting together this app have already been shared on this blog. This section includes links to where you can find that information and gives a bit of context around how those techniques have been applied.</p>
<p>One of the key features of the application is the ability to select Dimensions and Measures from a filter pane. When Sense was released and no Cycle Group was available I put together this blog post on creating an alternative cycle group using a filter pane:</p>
<p><a href="https://www.quickintelligence.co.uk/qlik-sense-cycle-group/">How to Build a Cycle Group in Qlik Sense</a></p>
<p>The technique involves loading a list of dimension names and then using the <strong>min</strong> function to pick the first dimension in the selection and then return that. This can then be used as a calculated dimension in a chart, table, or even filter. The min function also has the ability to pass a parameter, so the nth minimum dimension can be found. This is what is used to give charts over six different dimensions.</p>
<p>The expressions are a little more tricky as there are three parts to the expression: the name, the Qlik expression, and the format specifier. It is just a case of finding which the minimum expression is (exactly the same as the dimension), then each of the parts is looked up separately and then concatenated together.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1505244" src="https://www.quickintelligence.co.uk/wp-content/uploads/2020/06/Alert-Expressions.jpg" alt="Sense Alert Configuration" width="695" height="87" srcset="https://www.quickintelligence.co.uk/wp-content/uploads/2020/06/Alert-Expressions-200x25.jpg 200w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/06/Alert-Expressions-300x38.jpg 300w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/06/Alert-Expressions-400x50.jpg 400w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/06/Alert-Expressions-600x75.jpg 600w, https://www.quickintelligence.co.uk/wp-content/uploads/2020/06/Alert-Expressions.jpg 695w" sizes="(max-width: 695px) 100vw, 695px" /></p>
<p>You will note from the video that there is a lot of repetition in this app, the eight KPIs on the front sheet, six charts with different dimensions on the second. These could have been done with a bit of copy and paste and editing. Changes, however, would then be a nightmare. Instead, variables are used, but rather than having a separate variable for each chart or KPI, there is a variable for each type which takes a parameter, 1 through 8 or 1 through 6, depending.</p>
<p>This technique of passing parameters into variables is a great timesaver. This blog post describes how you can use it in your own applications:</p>
<p><a href="https://www.quickintelligence.co.uk/variables-parameters-load-script/">Variables With Parameters In Qlik Load Scripts</a></p>
<p>Combinations of these two techniques drive the charts and filter panes across pretty much all of the sheets in the app.</p>
<p>Another feature worth mentioning, though, is the showing and hiding of fields in the straight table object. Both the dimensions and the tables are created as described above, with variables that take parameters to return the dimension or variable. There are six dimensions and six expressions by default. The user can choose any number of each, up to six. Columns are then hidden as required, using a show condition on the column. Where this is particularly useful is on the dimensions, so with six columns you will have rows for each unique combination of values. If you pick one dimension, the other columns are hidden and the table will aggregate so that only one row per distinct value in the selected dimension is shown. This is incredibly useful for custom tables.</p>
<p>The final sheet is the Quick Intelligence Data Profiler. This is a set of objects that can be copied and pasted into any app that allows you to pick any field in the data model (from the $Field system field), which then shows a list box and bar chart showing frequency of values within the field. This is something I have put into pretty much all of my Sense apps since the product was released, and in QlikView before that. Most Qlik consultants will have their own go-to version of this kind of sheet. A tutorial on how to build one like mine is here:</p>
<p><a href="https://www.quickintelligence.co.uk/qlik-sense-data-profiler/">Qlik Sense Data Profiler</a></p>
<p>So, now you know a bit about how it works, why not download the app and have a go yourself?</p>
<h3>Download the App</h3>
<p>The application can be downloaded from <a href="https://www.quickintelligence.co.uk/instant-qlik-sense-app/" target="_new" rel="noopener noreferrer">https://www.quickintelligence.co.uk/isa/</a>. We do ask for an email address before you download the app, so we can notify you of upgrades. Please don&#8217;t pass the QVF onto others, but send them to the link given here. There is no charge for the app, but please credit Quick Intelligence if you use it largely unchanged.</p>
<p>The data in the app is from the <a href="https://docs.magicthegathering.io/" target="_new" rel="noopener noreferrer">Magic The Gathering API</a>, just to provide some non-contentious data so you can see it work out of the box. If you are interested in loading data from open REST APIs, then the code is all in there.</p>
<p>If you point this app at an open data-source that is available to all, and you are happy to share your work, please get in touch. I would like to ship meta-data files and load scripts for a number of different open data sources to show the application in action.</p>
<p>Please feel free to get in touch, via the comments, if you have any questions.</p>
<p>Enjoy the app, I hope you find it really useful.</p>
<h3>Update!</h3>
<p>We now have this application hosted so you can interact with a couple of demos. One looks at <a href="https://www.quickintelligence.co.uk/sense/askqv.html" target="_blank" rel="noopener">AskQV Blog Posts</a> and the second <a href="https://www.quickintelligence.co.uk/sense/gs-app.html" target="_blank" rel="noopener">Tennis Grand Slam Final Data</a>.</p>
<p>The scripts for both of these apps in included in the download, should you wish to see how the data is loaded or host the script on your own Sense instance.</p>
<p>The post <a href="https://www.quickintelligence.co.uk/instant-qlik-sense-application/">Instant Qlik Sense Application</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/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1505236</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-09-29 19:41:35 by W3 Total Cache
-->