If you haven't heard about Qlik-cli you have been living under a rock, sorry! The good news is, it’s not too late to try it. Let’s begin with the basics...
I am always learning something new when it comes to Qlik products. This week, while working with a colleague, I learned about the sheet action “select values matching search criteria” that I had never used before, so I decided to blog about it. I have used sheet actions in the past to clear selections or to select a bookmark when navigating to a sheet, but this sheet action performs a search to make selections. My colleague needed to make a series of selections to include and exclude data based on specific criteria. Using this sheet action, he was able to execute a complex expression to make selections on a sheet saving the users time when they navigate to that sheet.Up to five actions can be added and they will run in the order they are listed. Sheet actions can be added from the Properties panel of a sheet. In this example, I have 3 actions.Quantity > 100 actionBabywear actionYear actionIn the first action, I am selecting quantities greater than 100. Notice in the Quantity > 100 action that single quotes are required when using an expression for the search criteria. It is possible for an action to deselect a previous action. For example, the first action selects 110, 120, 130 and 150 from the Quantity field. Then, in the second action, Babywear is selected from the CategoryName field, deselecting 110, 130 and 150 from the Quantity field. The last action selects 2021 from the Year field which deselects Babywear. So once all the actions are performed, these are the selections made.Here is a list of all the sheet actions that are available:Apply bookmark – Apply an existing bookmark when navigating to a sheet.Clear all selections – Clear all selections when navigating to a sheet.Clear selections in other fields – Clear all selections from all fields except the one specified.Move forwards in your selections – Move one step forward in selection history.Move backwards in your selections – Move one step backwards in your selection history.Clear selections in field – Clear all selections from a specified field.Lock all selections – Lock all selections in the app.Unlock all selections – Unlock all selection in the app.Unlock a specific field – Unlock selections in a specified field.Select all values in a field – Select all values in a specified field.Select values in a field – Select value(s) in a specified field.Select values matching search criteria – Select values that match specified search criteria.Select alternatives – Select alternative values in a specified field.Select excluded – Selected excluded values in a specified field.Select possible values in a field – Select possible values in a specified field.Toggle field selection – Set a button to toggle between current selections and a selection that adds selections defined by a search string.Set variable value – Assign a value to a variable.Most of these are very straightforward but you can find more details on sheet actions in Qlik Help. Some important things to note:You cannot set an action based on the results of another action because they are all evaluated before they are performed.Sheet actions will not be triggered if the sheet is used in a mashup or an embedded sheet.Some of these actions give you the option to override locked selections. See Qlik Help for list.You cannot use fields with date, timestamp, or money data type.With the “select values matching search criteria” sheet action, you can use an expression or simply a value to search for and make selections in a specified field. This can be useful if you have a sheet in your app designed to perform a specific analysis that requires some selections to be made to begin. Using an action makes it easier for the user to get started and leaves little room for error by forgetting to make needed selections. I love that I am always learning something new with Qlik. Try out sheet actions in your app to automatically apply selections.Thanks,Jennell
...View More
Picasso.js is a powerful charting library that plays really well within the Qlik Sense ecosystem to build simple or very complex visualization.By leveraging its component-based nature, you can combine the building blocks to create virtually any type of chart.To learn more about Picasso.js, I recommend the following resources:Creating Picasso chart with data from Qlik: https://community.qlik.com/t5/Qlik-Design-Blog/Qlik-Engine-and-Picasso-js/ba-p/1706241What makes Picasso unique: https://community.qlik.com/t5/Qlik-Design-Blog/Picasso-js-What-separates-it-from-other-visualization-libraries/ba-p/1829951An advanced chart using Picasso: https://community.qlik.com/t5/Qlik-Design-Blog/Create-a-Slope-chart-with-tooltips-and-brushing-using-Nebula-js/ba-p/1827168The full documentation of the library can be found on qlik.dev at https://qlik.dev/libraries-and-tools/picassojs. Navigating the documentation is easy, you can dig deeper into the main concepts, learn more about the different types of supported scales, but more importantly discover the different components that you can mix and match to create unique visualizations.A feature of Picasso that I really like but is not very clear from the docs is Theming.Picasso.js is themeable meaning that you can easily control the look and feel across all visualizations by creating a theme and changing a few base variables.To do that, you simply pass in a theme object when instantiating Picasso js as follows:…
Import picassojs from ‘picasso.js’;
…
const picasso = picassojs({
style: {
'$font-color': '#FF00FF',
'$font-size': '10px',
'$font-family': 'Arial',
'$font-size--l': '16px',
'$guide-color': '#00FF00',
'$shape': { // for use with type point component
fill: '#00FF00',
strokeWidth: 1,
stroke: 'rgba(255, 255, 255, 0.2)',
shape: 'star',
},
},
palettes: [{
key: 'categorical',
colors: [
chroma.bezier(['#00FF00', '#0000FF']).scale().colors(5),
],
}, {
key: 'sequential',
colors: [
['#00FF00', '#0000FF'],
],
}],
});Notice that you can change the labels’ font styling, colors, and even shapes of points (star, triangle, etc..) on the style object, and also pass in a color palette for categorical and sequential color scales.The result looks like this (the ugly colors are for demo purposes only!)Below is the complete code of the settings file and attached is the full project to run and edit./* eslint-disable no-unused-vars */
import {
useElement,
useState,
useStaleLayout,
useRect,
useEffect,
} from '@nebula.js/stardust';
import picassojs from 'picasso.js';
import picassoQ from 'picasso-plugin-q';
import chroma from 'chroma-js';
export default function supernova() {
const picasso = picassojs({
style: {
'$font-color': '#FF00FF',
'$font-size': '10px',
'$font-family': 'Arial',
'$font-size--l': '16px',
'$guide-color': '#00FF00',
// $shape: { // for use with type point component
// fill: '#00FF00',
// strokeWidth: 1,
// stroke: 'rgba(255, 255, 255, 0.2)',
// shape: 'box',
// },
},
palettes: [{
key: 'categorical',
colors: [
chroma.bezier(['#00FF00', '#0000FF']).scale().colors(5),
],
}, {
key: 'sequential',
colors: [
['#00FF00', '#0000FF'],
],
}],
});
picasso.use(picassoQ);
return {
qae: {
properties: {
qHyperCubeDef: {
qDimensions: [],
qMeasures: [],
qInitialDataFetch: [{ qWidth: 2, qHeight: 5000 }],
qSuppressZero: false,
qSuppressMissing: true,
},
showTitles: true,
title: '',
subtitle: '',
footnote: '',
},
data: {
targets: [
{
path: '/qHyperCubeDef',
dimensions: {
min: 1,
max: 1,
},
measures: {
min: 1,
max: 1,
},
},
],
},
},
component() {
const element = useElement();
const layout = useStaleLayout();
const rect = useRect();
const [instance, setInstance] = useState();
useEffect(() => {
const p = picasso.chart({
element,
data: [],
settings: {},
});
setInstance(p);
return () => {
p.destroy();
};
}, []);
useEffect(() => {
if (!instance) {
return;
}
instance.update({
data: [
{
type: 'q',
key: 'qHyperCube',
data: layout.qHyperCube,
},
],
settings: {
scales: {
x: {
data: {
extract: {
field: 'qDimensionInfo/0',
},
},
},
y: {
data: { field: 'qMeasureInfo/0' },
invert: true,
expand: 0.1,
},
c: {
data: { field: 'qMeasureInfo/0' },
type: 'color',
},
},
components: [
{
type: 'axis',
dock: 'left',
scale: 'y',
},
{
type: 'axis',
dock: 'bottom',
scale: 'x',
settings: {
line: {
show: true,
},
},
},
{
type: 'grid-line',
x: 'x',
y: 'y',
},
{
key: 'bars',
type: 'box',
data: {
extract: {
field: 'qDimensionInfo/0',
props: {
start: 0,
end: { field: 'qMeasureInfo/0' },
},
},
},
settings: {
major: { scale: 'x' },
minor: { scale: 'y' },
box: {
fill: { scale: 'c', ref: 'end' },
},
},
},
],
},
});
}, [layout, instance]);
useEffect(() => {
if (!instance) {
return;
}
instance.update();
}, [rect.width, rect.height, instance]);
},
};
}
...View More
Today our Leigh Kennedy, Principal Enterprise Architect, will walk you through Systems Development lifecycle concepts used with the Qlik Active Intelligence platform. This is a 2 part series, this entry covers Part 2. Part 1 can be viewed here.
What is a regression line? In simple terms, it is a line that best describes the behavior of a set of data. They are often used for forecasting to illustrate the relationship between the dependent y variable and the independent x variables when there is linear pattern. Using a regression line can show future behavior of the dependent variable using different inputs for the independent x variables. Scatter plots now support regression lines and provide many options to choose from. In the properties pane of the scatter plot chart under Add-ons, is an option for Regression Lines.Click the Add Regression Line button to add a regression line to your chart. There are many types to choose from depending on your data and what you would like to show. According the Qlik Help, here are the regression line types available to add to a scatter plot chart.Average: Shows the average value of the data.Linear: Shows a linear increase or decrease of values.Second Degree Polynomial: Shows a curved line to represent fluctuating data with one hill or valley.Third Degree Polynomial: Shows a curved line to represent fluctuating data with up to two hills or valleys.Fourth Degree Polynomial: Shows a curved line to represent fluctuating data with up to three hills or valleys.Exponential: Shows a curved line. Use when data values rise or fall at increasingly higher rates.Logarithmic: Shows a curved line. Use when the rate of change in data increases or decreases quickly, then levels out.Power: Shows a curved line. Use with data sets that compare measurements that increase at specific rates.Here are some regression line examples:AverageLinearSecond Degree PolynomialFourth Degree PolynomialThere are some additional properties that can be set for a regression line. The color of the line and label can be set, and the line can be displayed as solid or dashed. The direction of fit can also be set to either minimize vertically or minimize horizontally. A scatter plot can also have more than one regression as seen in the chart below.Regression lines are helpful for analysis because it allows us to see patterns in our data. They allow us to see the relationships between two or more variables and examine which variables may have an impact. Check them out - Qlik Sense makes it easy to use them in your scatter plots charts.Thanks,Jennell
...View More
For those of us who want to go beyond the out-of-the-box capabilities of Qlik Sense and want to leverage the full potential of the platform to create complex visualizations or satisfy custom development needs, understanding the Engine API is fundamental to taking advantage of what Qlik Sense hides under the hood.The Qlik Engine API is a websocket protocol that uses JSON RPC 2.0 to communicate between the Qlik Associative Engine and clients. It works independently of any platform and programming language as long as it supports WebSockets and can parse JSON.A great place to get your feet wet with trying out the Engine API is through Qixplorer (You might remember this as the Engine API Explorer on Qlik Managed). The tool that you can access at https://qixplorer.qlik.dev features a newly reimagined user interface and additional updates for a better experience.Right off the bat, you can see that the format is divided into 4 main sections:Left: This is where you configure your connection to the tenant, pick the app, and browse through methods made available for your selected object.Middle: This is where you can see your requests and responsesBottom: This area is where you can construct and modify your requests and execute themRight: This is a neat feature that shows you inline documentation as you explore API methodsOther settings include a Light/Dark mode toggle at the top left, as well as a Layout toggle that lets you switch between the Original Layout (side by side request and response sections) or, my favorite, the Chat Layout.How to use Qixplorer?The first thing you would need to create a new connection to your Qlik Cloud tenant is a Web Integration ID. You can grab that by going to your tenant’s Management Console, under Web, Create a new integration and add https://qixplorer.qlik.devas an origin.Once you have the generated ID in hand, create a new connection on Qixplorer as shown below:The next step is to choose the app you want to connect to from the second dropdown.Once you select that, you will see that a first request and response have been made automatically. That’s the “OpenDoc” method, it is responsible for opening an app. More about it here.Notice that a few items are now highlighted on the Left panel that you can start using - including the Doc and Global classes that can be expanded to reveal all the methods you can execute. You can also use the pre-defined Macros to list sheets, dimensions etc...⚠️Before we continue, keep in mind that when using Qixplorer, you are performing changes directly on your apps, so when executing API methods to update or delete within Qixplorer, it will affect the objects in your apps.Examples of using QixplorerUsing Macros to list sheets in our appFrom the Macros dropdown, click on “ListSheets”.Notice that the Request section at the bottom has our generated JSON with the methods needed to list sheets.Click on Execute and view the JSON returned in the Response section.P.S: notice that two separate requests have been made by our Macro: CreateSessionObject and GetLayout.Using a method from GlobalLet’s create an App in our tenant directly from Qixplorer.First, select the “CreateApp” method from the Global dropdown.Notice that the right panel has been populated with the inline documentation for our method. This makes it really convenient to view the definition and parameters at a glance.Within the Request section that now contains the editable JSON, enter a name for the app we’re creating in the “qAppName” property.Our request and response look like this:{
"handle": -1,
"method": "CreateApp",
"params": {
"qLocale": "",
"qLocalizedScriptMainSection": "",
"qAppName": "test-qixplorer"
}
}You can check your tenant to view the newly created app:Using a method from Doc and GenericObjectLet’s retrieve the calculated data from a Table object in our app.First, we need to get the object. Under ”Doc”, scroll down to GetObject and change the “qId” property to our Table's object id.Now that we got the object, you can go to ”GenericObject”, then “Select Object” and click on table.Next, scroll down to the “GetHyperCubeData” method under “GenericObject” and modify the JSON as follows to set the qHeight (number of rows to retrieve) and qWidth (number of columns){
"handle": 2,
"method": "GetHyperCubeData",
"params": {
"qPages": [
{
"qHeight": 1000,
"qWidth": 5,
"qTop": 0,
"qLeft": 0
}
],
"qPath": "/qHyperCubeDef"
}
}Click on execute and examine the response:The Engine API is without a doubt very powerful as it exposes methods that can be used to tap directly into the associative engine and manipulate complex data structures. Having a tool like Qixplorer is a great way to try out the API and learn more about all the methods available in a single place.Let me know in the comments how you use Qixplorer on you end!
...View More
This week, Insight Advisor got even better with the new analysis type experience. Now when you click on the Insight Advisor button from within an app, you have 3 options for insights.You are probably familiar with the first two options. Explore your data allows you to select fields and/or measures from a list that Insight Advisor will use to generate analyses.The second option, Ask a question, allows you to use natural language to ask a question.The third option, Create an analysis, allows you to select from a long list of analysis types such as ranking, trend over time, and correlation to gain insight. The image below shows just some of the analysis types available. You can find all available analysis types here in Qlik Help.The analysis types are helpful to users who know what type of analysis they are looking for but may not have the skill set to create it. Users can select the analysis type they are looking for and get the best data and option. Let’s look at a few examples. If I select the breakdown analysis type, I am prompted with suggested measures and dimensions I can use, as well as the number of measures and dimensions I need to select to perform a breakdown analysis.I can select the measures and dimensions as seen above and then analyses are auto generated as seen in the images below. These visualizations can be edited in the analysis properties pane or added to a sheet in the app. Selections can also be made from the analysis.Here is another example using the clustering analysis type. In this example, we get a scatterplot as well as some information about the insights found.There are many analysis types to choose from and they are all easy to produce and get insights from without having to take the time to create them manually, which in some cases can be complex. The analysis types are best practice within organizations and methodologies that are used by many. Try it out yourself to see how easy it is to perform complex analyses in your apps. To learn more, read the Qlik Product Innovation Blog and check out Michael Tarallo’s SaaS in 60 video and demonstration walk-through.Can't see the videos? YouTube blocked by your region or organization? Check out this link on our video site:https://videos.qlik.com/watch/vK3S8eoBAoXNjzJzwfJErV.Thanks,Jennell
...View More