Have you already heard about Qlik Sense Cloud?Borrowing the marketing jargon we could define Qlik Sense Cloud as a place to “create and interact with Qlik Sense apps whenever the need arises. Invite others to do the same in a secure environment. Explore data deeply, reveal connections instantly and see opportunities.”That means you can create and share an app in the Cloud, work collaboratively with up to 5 peers, editing, creating new charts, or even uploading some more data, just as you are used to with Qlik Sense. But it also means an extraordinary opportunity. Qlik Sense Charts is a chance for us to share data insights with everybody, everywhere. The way it works couldn't be more simple, let’s check it out.Create your own app.If you already have an interesting app you want to share you could use it by simply uploading it into the Qlik Sense® Cloud, otherwise you can create your app from the Qlik Sense® Cloud. Create a chart you would like to share.Create your chart or reuse one you already created, adjust sorting, colors, and all the attributes you would like to set up prior to sharing it.Share it!Right click on the chart* and click on share. You will get a popup with the URL to share the chart in your favorite social network or send via email, and also an Embed URL code that will help you place it in your web publication, online magazine, blog post, etc.If you are curious to see how Qlik Charts looks like and you want to see the charts live please check out the following links:Single Chart: Qlik Sense Charts: Visualizing MoMA art pieces by Artist Embeded Chart: (Spanish language) Los puntos negros de las multas de estacionamiento: 114 millones de euros en un año | Madrid | EL MUNDOEnjoy sharing!AMZ*At this point we could share Bar charts, Line charts, Combo charts, Gauges, Maps, Scatter charts, and Treemaps.
...View More
The Above() function is a very special function. It is neither an aggregation function, nor a scalar function. Together with some other functions, e.g. Top(), Bottom() and Below(), it forms a separate group of functions: Chart inter-record functions. These functions have only one purpose: To get values from other rows within the same chart. The basic construction is the following: Above( Sum( Sales ) )This will calculate the sum of sales, but for the row above.The most common use case is when you want to compare the value of a specific row with the value of the previous row; e.g. this month’s sales compared to last month’s sales.Another use case is when you want to calculate rolling averages. Then you need to use the second and third parameter; the offset and the number of cells. Below, I use Above( Sum( Sales ), 0, 12 )The function will return 12 rows: the value for current row and the 11 rows above. This means that you need to wrap it in a range function in order to merge all values to one value. In this case, I use RangeAvg() to calculate the average of the 12 rows.However, both the above solutions have a flaw: They don’t take excluded values into account. For example, if April is excluded due to a selection, the previous month of May becomes March, which probably isn’t what you want.To correct this, you need to make the chart show all months, also the excluded ones. In QlikView, you have a chart option “Show all values” that you can use. A method that works also in Qlik Sense, is to add zero to all values, also for the excluded dimensional values: Sum( Sales ) + Sum( {1} 0 )Make sure to “Show zero values”.You can also use the Above() function inside an Aggr() function. Remember that the Aggr() produces a virtual table, and the Above() function can of course operate in this table instead. This opens tremendous new possibilities.First, you can make the same calculations as above, by using Only(Aggr(Above(Sum({1} Sales)), YearMonth)) Only(Aggr(RangeAvg(Above(Sum({1} Sales),0,12)), YearMonth))Note the Set Analysis expression in the inner aggregation function. The {1} ensures that all values in the virtual table are calculated, so that the Above() function can fetch also the excluded ones. Using {1} is maybe too drastic – it is often better to use a Set expression that clears only some fields, e.g. {$<YearMonth=>}.Further, you can have a virtual table that is sorted differently from the chart where the expression is displayed. For example, the expression Aggr(Above(Sum(Sales)),Year,Month)displays the value from the previous month from the same year. But if you change the order of the dimensions, as in Aggr(Above(Sum(Sales)),Month,Year)the expression will display the value from the same month from the previous year. The only difference is the order of the dimensions. The latter expression is sorted first by Month, then by Year. The result can be seen below:An Aggr() table is always sorted by the load order of the dimensions, one by one. This means that you can change the meaning of Above() by changing the order of the dimensions.With this, I hope that you understand the Above() function better.HICFurther reading related to this topic:Accumulative SumsAccumulationsPitfalls of the Aggr function
...View More
A community user recently asked if there was any way to capture images of Qlik Sense objects in mashups and save to disk. So the idea is, a user is using your mashup, makes some selections, finds some cool insights, and wants to save an image of the charts or objects in the mashup.This is a bit tricky with the current browsers, but I've put together a solution that I've tested on newer versions of IE, Firefox, and Chrome, which works well. I'm going to attach it to this post, and walk you through using it.The first thing you'll want to do is download the qBlob.zip file that's attached to this post. Then unzip it and place the qBlob folder in your mashup folder, which can be located at C:\Users\<username>\Documents\Qlik\Sense\Extensions\<mashup name> on Qlik Sense Desktop. If you are using Qlik Sense server, you will need to serve the files some way.Then you'll need to include the qBlob.js in your mashup .js file, like so -Once it's included, all you need to do to use it is call the following function, replacing <objId> with the ID of the container element of the Qlik Sense object, which you most likely also used in the app.getObject() method, and replace <output filename> with a filename you wish to output to. The filename requires a type, such as .png or .jpg.
qBlob.saveToFile(<objId>, <output filename>);
In the mashup I built to test the functionality, I attached the above function call to a click handler on an anchor element, like so -
$("a").click(function(e) {
e.preventDefault();
qBlob.saveToFile('QV01', 'mychart.jpg');
});
You can take a look at this in action here - qBlob TestI've attached my entire mashup folder that's linked to above, as well as just the qBlob folder that you'll need to do this in your own mashups.
...View More
The Set Analysis is a commonly used tool when creating static or dynamic filters inside aggregations in Qlik Sense or QlikView. But sometimes you need the opposite to selecting – you need to exclude values. How can this be done?
Have you ever heard of the Mode function? Until recently, I was not aware of this function. The Mode function can be used in the script or in a chart to find the most commonly-occurring value in aggregated data. I will show you how it works by loading the small data set below.Now that I have loaded this data, I may want to see which Product Category or Product Subcategory occurs the most. To do this in Qlik Sense, I can add a Text & image object to a sheet and add the measure Mode([Product Category]) or Mode([Product Subcategory]).Mode([Product Category]) returns Clothing because it is the most common value in the Product Category field.Mode([Product Subcategory]) returns Jerseys because it is the most common value in the Product Subcategory field.Making selections can affect the data returned by the Mode function. For instance, if I selection Store A, Accessories will be the most common product category and Helmets will be the most common product subcategory. If I want to avoid these values changing when I make selections, I can simply use the set analysis expression {1} which will evaluate all records and ignore any selections I have made.Mode({1} [Product Category])Mode({1} [Product Subcategory])The Mode function can also be used in the script to determine the most commonly-occurring value. The key to remember when using the Mode function in the script is to use the Group By clause. By using the Group By clause, you are indicating what field the values should be aggregated by. In the script below, I am loading the products in the first load script and then in the second load script, I am using the Mode function to determine the most commonly-occurring store by Product Category.The results will look like this:For the Accessories product category, Store A is the most common and for Clothing, Store C is most common. If there is not one single value that occurs more than the others, then the Mode function will return NULL.The Mode function provides a quick way to see which value occurs the most in aggregated data. It can be used with text data, as done in the examples show here, or with numeric data. Hopefully, you learned something new as I did about one of the many functions offered in Qlik Sense and QlikView.Thanks,Jennell
...View More
Set Analysis is a commonly used tool when creating advanced formulas in Qlik Sense or QlikView. But why is it called “Set Analysis”? And why are there so many curly brackets?
There were numerous times that I was asked to show more than one chart in the same page. This tutorial will show you how to place two buttons which will toggle the visibility of certain graphs.From the Mashup Editor create a new mashup and select the "Grid mashup template". This will add in your page Bootstrap which we will need for the buttons that will handle the toggling.Then, select the "Helpdesk Management" and place the charts that you want to toggle onto the grid. I selected "Avg Case Resolution Time" and "Open Cases by Age".If you want to preview your files in another tab outside of the Mashup editor, the url would be something like "http://localhost:4848/extensions/tutorial-toggle/tutorial-toggle.html".You will see in your html the grid with rows and columns and your visualizations.
<div class="row">
<div class="col-sm-6 qvplaceholder" id="QV01">
</div>
<div class="col-sm-6 qvplaceholder" id="QV02">
</div>
</div>
<div class="row">
<div class="col-sm-6 qvobject" id="QV03">
</div>
<div class="col-sm-6 qvobject" id="QV04">
</div>
</div>
Make sure you remove the "qvplaceholder" from QV01 and QV02, otherwise you will have a lot of extra space between your buttons and the chart.In your js file you will see the code that places the objects into the html grid. Just for now, we will place both of the objects. We only need their ids, so later on we will remove the second chart.
//callbacks -- inserted here --
//open apps -- inserted here --
var app = qlik.openApp('Helpdesk Management.qvf', config);
//get objects -- inserted here --
app.getObject('QV04','a5e0f12c-38f5-4da9-8f3f-0e4566b28398');
app.getObject('QV03','PAppmU');
Now, we will create 2 radio buttons that handle the toggling of the charts. In row 1 and column 1 we will add the following:
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-default active">
Avg Case Resolution Time
<input type="radio" id="chart" name="chart" value="PAppmU" checked="checked"/>
</label>
<label class="btn btn-default">
Relative to Population
<input type="radio" id="chart" name="chart" value="a5e0f12c-38f5-4da9-8f3f-0e4566b28398"/>
</label>
</div>
Now we can remove the second chart, 'QV04' from the JS file.The final page should look like thisIf you have time and you want to make this more visual appealing, you can add some transition effects like fading.We will add the "$('#QV03').fadeOut" in the JS file. Once this is completely faded out, we will then replace the object and fade it back in.
$( document ).ready(function() {
$("input[name='chart']").change(function(obj){
$('#QV03').fadeOut('fast', function(){
app.getObject('QV03',obj.target.value);
$('#QV03').fadeIn('fast');
});
});
});
If for any reason the object does not show after hiding the first element, try to add qlik.resize and the id of the new object.
qlik.resize(obj.target.value)
Attached you will find all of the files. Just unzip and place into your "Documents\Qlik\Sense\Extensions" folder.
...View More
The Aggr() functions is one of the most advanced functions in the Qlik engine, and it is not always easy to use. This blog post is about its most common pitfalls.
Spoiler (Highlight to read)New version here:Qlik Sense Search Cheat SheetNew version here:Qlik Sense Search Cheat Sheet
Over the last months hic and jmc have covered in this blog some of the main aspects behind Qlik (QlikView and Qlik Sense) Search capabilities.
Today’s blog post is a short one to share with you a Cheat Sheet I've created with some basic functions and modifiers that users can apply to improve a search within Qlik Sense. Because different places (Assets panel, Dimension and measure selectors) offers different capabilities it's important to notice that this quick reference is intended to searches performed in Filter panels, Tables or Selection items only.
Find here a print-ready copy of the Qlik Sense Search Cheat Sheet containing all search modifiers available for Qlik Sense.
UPDATES:
New version here:Qlik Sense Search Cheat Sheet
v1.3 "() String Number Search" added.
v1.2 "- Modifier Search" included.
v1.1 Date search included.
...View More
Several aspects of the Qlik search mechanism has been described in previous posts. There is however one that has not been covered: Search in dual fields, e.g. dates. This post will try to explain the basics.