2017

Overview

I've seen a few questions regarding integrating Qlik Sense visualizations into existing webapps lately, and figured I'd lay out a few tips here that may be of help.

 

There's really two ways of integrating Qlik Sense visualizations into your webapp, by either using the Capability APIs or iFrames. I'll discuss the pros and cons of both.

 

Capability APIs

The Capability APIs include the Root API, the App API, and the Visualization API, among a few others. The Root API is used to connect to an app, and either the App API or the Visualization API can be used to then embed Qlik Sense objects onto the sheet. There's quite a few resources regarding the details of actually doing this available already, so I'll skip that, but if there's any questions surrounding it, let me know. What I do want to talk about is the pros and cons of using the Capability APIs vs iFrames.

 

The pros of the Capability APIs are that all you have to do to use them is load the assets that are conveniently served from the Qlik server, supply a config, require the qlik.js file, and you're set. You can quickly get up and running, and you're able to not only embed existing visualizations, but you can create visualizations on the fly using the Visualization API and patch them as you go. So, it's easy to get going, and to embed, create, or even update visualizations on the page.

 

The downside is that the assets needed for the Capability APIs include Require.js and Angular 1.5.8, and they're both globals that can be quite intrusive, and force you to redesign your existing app to play nicely with their residency in the global scope.

 

iFrames

And that's exactly the best thing about iFrames. Since an iFrame is totally encapsulated from its parent page, there's no issues with existing assets and assets needed to embed Qlik visualizations colliding. And for all the other features that the Capability APIs offer, you can simply use enigma.js, which can share the same session as the iFrame'd objects.

 

One of the things to watch out for when using iFrames is that Internet Explorer, by default, only allows a maximum of 6 concurrent connections. So that's a limitation if you need to support IE. Another thing that you won't be doing is creating any visualizations on the fly.

 

Hybrid

To help overcome the websocket number limit, or if you really need to create visualizations on the fly, but also want to use the iFrame approach, what you can do is instead of embedding visualizations using iFrames, you can create a mashup, and then embed that into your webapp in an iFrame. Using HTML5's window.postMessage API, you can enable communication between your app and the mashup in the iFrame, and you can also still use enigma.js in your webapp.

Hello Qlik Community! Qlik's Bruno Calver is back sharing his in-the-field experiences, building upon his User Experience white paper made available last year. This time he has authored a white paper on Data Literacy. Bruno has worked with many large global enterprises, helping them discover the value in their data and how to best represent it in order to drive results.  During this time he has come across many different ways of working with data. This article tries to consolidate the key take-aways within the context of data literacy. Be sure to download the attached PDF at the bottom of this post to learn more.

 

Introduction


Literacy skills have always been top of the bill in the education system -- and for good reason. Equally, data literacy skills are climbing the agenda in today’s competitive business environment.

 

Organizations will soon rely less and less on pre-processed information and their gut instincts as a decision making paradigm. It is increasingly important for everyone to apply critical thinking skills to every problem and data set in order to achieve a competitive advantage and create truly innovative solutions.

 

However, for many of us it is not clear what data literacy means, let alone the skills and techniques that might help drive our own data literacy level. The attached article explores these concepts and provides 5 key areas to think about when analyzing your data - including practical examples:

 

  1. Trends & Context
  2. Internal & External Data
  3. Cohorts & Cell based analysis
  4. Averages, Aggregation & Distribution
  5. Bias & Non-Causal Correlations

 

Increasing data literacy skills can have a profound impact on organizations in the following ways:

 

  • Increasing user adoption and awareness of analytical tools and capabilities
  • Creating data driven cultures to enhance performance
  • Unlocking more value from your data investment

 

If this sounds interesting, then please read the article and see what new things you can discover about the language of data…!

 

bruno.png



Bruno is a Principal Solution Architect working in the UK with some of Qlik’s enterprise customers. His passion is working with business people to turn disparate and otherwise mundane data sets into insights and stories that can engage their audience, drive change and inspire new ways of thinking.

Jennell McIntire

FileSize Function

Posted by Jennell McIntire Sep 22, 2017

In the past, I have blogged about the FileName function and how I used it to generate data for my Qlik Sense app.  Today, I thought I would blog about another file function, the FileSize function.  The FileSize function is a script function that can be used to return the size of a file or table.  The FileSize function returns an integer for the size, in bytes, of the file specified or a table.  The file can be a QVD, a text file, an Excel file or a table.  The syntax is quite simple:

 

Syntax:

FileSize([filename])

 

I have used the FileSize function to determine if a QVD exists before I load it.  In the example script below, I set the size of the CustomerMaster QVD to the vSize variable.  Then I check the variable to see if a size was returned.  If a size was returned meaning a QVD is there, I load the QVD.  If the QVD does not exist then the FileSize function will return null.

script.png

The FileSize function can also be used to return the table size of the table file being read.  To do this, the FileSize function is used in the Load statement as seen in the example script below.  When the filename parameter is excluded, then the FileSize function will return the size of the table currently being read.  The TableSize field will store the size of the CustomerMaster table after it has been loaded.

script2.png

The FileSize function is another easy-to-use script file function that can be used in Qlik Sense or QlikView to provide the size of a file or a table.  Use the FileSize function as a checkpoint in your script to ensure the file is available before loading, as I did in the example above, or use it ensure size requirements for files being loaded are being met in your app.  Good luck scripting!

 

Thanks,

Jennell

new_thumb.png
Hey guys, happy Tuesday! I'm pleased to be back in this edition of the Qlik Design Blog to introduce you to the September 2017 release of Qlik Sense....right off the heels of hurricane Irma I might add. Florida (my home state) and its surrounding neighbors have been hit hard by this storm and I would like to first express my deepest sympathy for those that were affected by Irma's wrath. We will recover, as we always have, and by working together and supporting one another, we will be back on our feet in no time...oh and hurricane Maria, you better watch yourself Missy!) Now on to the show!

 


As we have previously mentioned, Qlik will be releasing software 5 times a year. Which equates to a new release about every 10 weeks or so. (You can learn more about our continuous release cycle by checking out this blog here: Qlik Sense® will release 5 times a year!)

 

Rather than list the new feature highlights in this blog, I created a brief video to cover and demonstrate them. You can always check out the Qlik Sense release notes on the Qlik Help site as well as download the attach data sheet to learn more. You can also try these features right now by logging in to the Qlik Sense Cloud or by downloading a free version of Qlik Sense Desktop: Download Free Data Visualization Development Platform.

 

 

 

Now remember, each release will vary in capabilities and features, with some releases possibly having "more" in certain areas than others. It is important to note that the releases will not only cover Qlik Sense specifics, but other product areas such as Qlik NPrinting, Qlik GeoAnalytics, Qlik Sense Mobile, Qlik DataMarket, data connectors, API enhancements and new services and procedures. For example, with the September 2017 release we are also introducing a new Extension Certification Pilot program to allow extension authors to submit their extensions for review, to be certified and supported by the author for use within the Qlik platform. Stay tuned for more information on this pilot program to learn how you can submit your extension for certification.

 

NOTE - Qlik Sense Mobile: The app is available on the iOS VPP app store (Apple’s enterprise app store) this week.

 

 

This is a huge milestone for Qlik as it brings the power of our Associative Technology to the iPad, online AND offline. Customers and partners need to have signed up for Apple’s enterprise developer program to get access to the app. Once they are members of enterprise developer program, they can download the app from https://vpp.itunes.apple.com. Most medium and large business have this relationship with Apple and for those who do not, we are bringing the app to the iOS public app store in the near future, so hold tight.

 

Enjoy!

 

Regards,

Mike Tarallo
Qlik

 

Additional Resources:


* To learn more about extensions - check out these videos:

 

 

* Did you miss what's new in our Qlik Sense June 2017 release? - Check it out here: Qlik Sense 2017 Releases - What's New

 

* More Videos

 

NOTE: To increase resolution or size of the video, select the YouTube logo at the bottom right of the player. You will be brought directly to YouTube where you can increase the resolution and size of the player window. Look for the 'settings' gears icon in the lower right of the player once at YouTube.

 

Can't see the video?

 

Download the .mp4 and watch from your computer or mobile device

Today, the QIX engine has some bugs in the area of a search and a subsequent select. These affect both interactive searches and searches in Set Analysis expressions. We are working on fixing them. However, one of these coming bug fixes may cause some backward incompatibility. This post explains what the bug fix will mean, and what you can do to avoid future problems.


When you use Set analysis, you can choose to have a condition in the form of a list of values in the Set expression, or you can choose to have a rule-based definition - a search for field values.

 

Examples of hard coded lists:

 

Sum( {$<Year = {2013,2014,2015}>} Sales)

Sum( {$<Country = {'Australia','Canada','France'}>} Sales)

 

Examples of searches:

 

Sum( {$<Year = {">=2013"}>} Sales)

Sum( {$<Country = {"Austr*"}>} Sales)

Sum( {$<Customer = {"=Sum(Sales)>100000"}>} Sales)

 

All the above constructions work today, and they will work correctly also after the bug fix.

 

Note the double quotes in the search expressions. These define the search strings, and between them you can write any search string – the same way as you would in a list box search.

 

However, you should not use single quotes to define a search string.

 

Single quotes are reserved for literals, i.e. exact matches. Hence they should be used when you want to make a list of valid field values, like the above list of explicit countries. But they should not be used for searches. Single quotes imply a case sensitive match with a single field value.

 

This difference between single and double quotes has been correctly described in the reference manual that states that searches are “always defined by the use of double quotes”. Also, all examples with literal field values in the documentation use single quotes.

 

Now to the bug: QlikView and Qlik Sense currently do not respect the above difference between single and double quotes. Instead, strings enclosed in single quotes are interpreted as search strings. As a consequence, it is not possible to make case sensitive matches with field values, something which you sometimes want to do.

 

This bug will be fixed in the coming November releases of Qlik Sense and QlikView. Then, wildcards in strings enclosed by single quotes will no longer be considered as wildcards. Instead, the strings will be interpreted as literals, i.e. the engine will try to match the string with a field value containing the ‘*’ character. The same logic will apply also to relational operators and equals signs.

 

Unfortunately, this bug has been incorrectly utilized by some developers: I have seen Set Analysis expressions with correct search strings, but erroneously enclosed in single quotes; for example

 

Sum( {$<Country = {'Austr*'}>} Sales)

 

This search should instead have been written

 

Sum( {$<Country = {"Austr*"}>} Sales)

 

Hence, there are documents with expressions that will not work in the corrected algorithm. However, the bug fix will be implemented in such a way that old documents will use the old logic, and new documents will use the new logic. In addition, it will be possible to force the new logic for all documents by using a parameter in Settings.ini.

 

You can of course also change the single quotes in existing search strings to double quotes, and the expression will continue to do what it always has done.

 

This post is mainly to give you a heads-up on a coming change, and give you a chance to make a quality control of your own documents. We will publish more information as we get closer to the release.

 

HIC

 

Further information related to Set Analysis and Searches:

A Primer on Set Analysis

The Search String

Introduction to Set Analysis (video) - Part 1

Set Analysis - Part 2 - Cool Stuff You Can Do (video)

A few months ago we at the demo team accepted the challenge to create a prototype for the healthcare industry. The goal was to create a user-friendly way to analyze a huge dataset provided by one of our healthcare partners, DarkMatter2bd. They carefully explained to us some usage cases for their data and we agreed to create a mashup to analyze and visualize “comorbidity”.

 

So what does comorbidity means?

 

In medicine, comorbidity is the presence of one or more additional diseases or disorders co-occurring with (that is, concomitant or concurrent with) a primary disease or disorder; in the countable sense of the term, a comorbidity (plural comorbidities) is each additional disorder or disease.


Source: Wikipedia

 

 

If you are in the healthcare industry then I am sure you have heard someone asking something like: can you show me patients that have X and Y and Z? To answer that question and some more we came up with a new mash up called Pre-launch Targeting & Clinical Trial Recruitment. It contains non-real data for almost six hundred thousand patients located in the state of Pennsylvania.

 

When a user gets into the mashup we prompt them with a search box that performs a search across the entire range of diseases or disorders available in our data sample. Once the user has chosen a primary disease we take them to the Recruitment page where data can be freely explored and analyzed, and more importantly, where more disorders or diseases can be added to the query.

 

Real use case scenario.

 

An imaginary healthcare company is planning to launch a new drug for people suffering from diabetes and they need to find a group of patients that meet some requirements. They must have diabetes and must have hypertension but must not be allergic to penicillin.

 

step1.png

After we search for diabetes we get to a count of 62,861 patients in our data. It represents approximately a 10% of our sample. Next  is time to search for hypertension. We will add a second condition to our query.

 

step2.png

 

The inclusion of hypertension draws 42,491 patients that suffer from both diabetes & hypertension.

 

Our last search will be penicillin intolerance. Please notice that by default our mashup will add new search terms with AND condition to the query. The count of patients temporarily reflects 113 patients for the combination of diabetes AND hypertension AND penicillin allergy. Users can freely switch any condition to AND NOT by clicking into the tag. By doing so in the "Personal History of Allergy to Penicillin" tag we end up having a result set that matches our initial request, resulting in 42,378 patients with diabetes AND hypertension AND NOT penicillin allergy.

 

step3.png

 

Set analysis element function P()

 

The secret sauce in our recipe is the Set analysis element function P(), it helps us to create subsets of data which we can operate with.

 

We basically want to count patients where disease = X and disease = Y. If we use Qlik notation for that condition would look like:

 

Count({<patient = P({<disease={'X'}>}patient) * P({<disease={'Y'}>}patient)>} distinct Patient)




 

The expression above will create two sets, P({<disease={'X'}>}patient) will contain all the possible patients that have disease = X, while the second piece P({<disease={'Y'}>}patient), will retrieve all the possible patients with disease = Y. Finally the " * " operator will calculate the intersection of both sets.


The webapp Pre-launch Targeting & Clinical Trial Recruitment dynamically creates as many P sets as needed and the right operator to compose the right expression.


If you want to learn more about Set Analysis please check this posts:


Why is it called Set Analysis?

A Primer on Set Analysis

Natural Sets

 

I hope you like Pre-launch Targeting & Clinical Trial Recruitment

 

Arturo (@arturoqv)

Some of you may remember that I recently posted about a similar topic here When do you post to Facebook?, where I talked about creating an app that allows users to authenticate with Facebook, grab their data with Facebook APIs, use halyard.js to generate a load script, and then create a session app. But when I did this just a few months ago, one of the things I really wished I could do was use the Visualization API so I could simply create charts on the fly using Qlik Sense, but it wasn't possible then because a session app could not be created from or associated with the Capability APIs.

 

However, new APIs were introduced with Qlik Sense June 2017 that makes it possible to create apps on the fly using the Capability APIs, so now it is possible to create an app, load data, and create visualizations, all on the fly! This is made possible by the addition of some new methods to the Capability APIs, including the qlik.sessionApp method, the qlik.sessionAppFromApp method, the setScript method, and the getScript method.


There's already some pretty decent documentation for doing this at Qlik Sense Help - Creating apps on the fly, and I recommend you check that out, but I want to make everyone is aware of this very cool new capability of Qlik Sense June 2017, and just briefly address some issues you may run into.


First thing first, which is something I ran into while trying to create an example for this blog post -- anonymous users cannot create session apps, and this does not seem to be able to be controlled by security rules. Unless I'm missing something, it's entirely impossible. So, no anonymous users.


Next, there's been a few questions about just how to go about loading data. The simple answer is you need to set a load script using the setScript method, and then use the doReload method to load the data. But where do you get the load script from in the first place? Well you can use the getScript method on an app that already exists, or you can just write a script, though, of course, you'll need to also create the data connections you'll need somehow too if they don't already exist. And for many instances that I can think of where I would want to create an app on the fly, I'd use halyard.js. You could also create a session app from an existing app, get the load script from that app, and do some kind of search and replace on the load script which would custom tailor the data for the current user. The point is, there's a lot of possibilities, and it's really up to you and your use case how you want to go about this.

 

With being able to create apps, load scripts, and visualizations all on the fly, there's really a ton of potential to do some awesome stuff here. It would cool to hear about how some of you are using these capabilities!

Filter Blog

By date:
By tag: