Qlik Sense documentation and resources.
[Paragraph format. Descriptive text here. See Content Guidelines for details. You can remove sections that are not needed for your article. If subheaders are needed, use heading 3 or heading 4 formats.]
By using a Multi-KPI object we can inject custom CSS onto the sheet to override the default limitations on pivot & straight tables
Step1:
Drag a Multi-KPI object onto the sheet and add a dummy measure example = 1;
Next, on the Properties panel of the Multi-Kpi object navigate to Appearance >> Styles
Add CSS here
Step2:
Paste the custom below
For Straight Tables add the below CSS snippet in the Styles(CSS) box
.qv-st .qv-st-value .qv-st-value-overflow {
max-height: none;
}
For Pivot Tables add the below CSS snippet in the Styles(CSS) box
.qv-pt .cell .value {
max-height: none;
white-space:pre
}
As shown below now each cell will fit to content of the cell based on line breaks in the content
Output
Cheers
Vineeth P
Have you ever noticed, when you have the same app open twice and make selections, those selections are reflected in all your open tabs? This is because they are all open using the same session/identity.
This has been one of the most requested features by our users as they like to compare things side by side, without changing the selections every time, or having to build charts with alternate states.
Luckily, there is a way to bypass this using the Qlik Single integration API.
The Single Integration API provides parameters that can be used to create an URL that returns a complete HTML page containing for example an embedded Qlik Sense visualization. This URL can be embedded in a web page, for example by including it in an iframe.
Here's how :
Voilà! You are now able to make different selections for the same app!
Insurance is one of the most complicated sectors in data analytics, developers struggle when it's required to calculated the acquired amount within the year, and especially those which overlap, here is an example to solve such kind of issues with Load Script:
The picture below shows some subscribed amount in different periods, but the customer needs the acquired amount within the year, if we take policy N° 004 as an example, we notice that we have a 7000,00 $ for a period of three years (2021 --> 2023), but how to proceed if the customer has to analyse year by year ? in my opinion it's usefull to create as many lines as we have in the covered period (EndYear-StartYear), i have used some dummy data to demonstrate the solution discussed above:
then i try to load the whole row as one field in order to load variables separately:
it's time to call our generator, for each row we should create as many line as we have in the whole covered period:
finally here's the generator of the result table:
here is the output:
expressions used:
DiffDays: Round((EffectiveEndDate-EffectiveStartDate)+1)
DaysOfYear: Round(YearEnd(EffectiveEndDate)-YearStart(EffectiveStartDate))
CoveredPeriod %: Round((EffectiveEndDate-EffectiveStartDate)+1)/Round(YearEnd(EffectiveEndDate)-YearStart(EffectiveStartDate))
AcquiredAmount: Sum((Amount*((EffectiveEndDate-EffectiveStartDate)+1))/((EndDate-StartDate)+1))
Note: this solution can impact performance when used with huge fact, i remain open for any suggestion or alternative.
Best ragards:
JM;
Version 1.7 - A new feature for the front end!
With the latest version, you can now quickly copy the output in expression editor windows using a button.
Check it out on YouTube : https://www.youtube.com/watch?v=CXPMbQSD9mQ
It is very likely that many of you build your data models so that you can easily reuse certain parts, such as dimensions.
Although some development methods such as the Qlik Deployment Framework (QDF) help speed things up, the task of renaming fields when reusing a QVD is still time-consuming.
Let's imagine that a fact table contains 3 customer dimensions and 2 warehouse dimensions and that for each of these dimensions you add a prefix, or that your fields are written in a multilingual way ([Customer/Customer/Cliente]) and you want to get the middle value. You could also use it to rename fields from an SQL database and format everything for a nice front-end result in Qlik.
It's now easier than ever with Sense Field Formatter.
(https://youtu.be/k3HQpJivyZM)
Allows a user to format a list of fields, delimited by commas, into an alias and standardized format.
The user has multiple configuration options to choose from.
When the extension icon is clicked, a popup menu is displayed where the formatting takes place and is pasted into the clipboard.
Will use the alias name (at the right of "AS") from your source fields as your new source fields.
e.g. [SourceField] AS [SourceAlias] -> [SourceAlias] AS [OutputAlias]
The character(s) used to identify the key fields in Qlik. Formatting will be handled differently here as the Prefixing will be done AFTER (the right) the key prefix to avoid breaking the key formatting.
e.g. Prefixing a key field with "Customer." will generate this: [%MyKeyField] AS [%Customer.MyKeyField]
Ignore formatting on Key Fields?
Fields starting with the identified key will NOT be formatted.
Places the comma either at the start or end of the line.
Should the field delimiters be double quotes or square brackets.
Find what: The character(s) you are looking to replace. Multiple characters can be replaced at once.
Replace with: Replace all occurrences of the character(s) in the fields.
Will insert a space before each capital letter in the fields, except for the first character.
e.g. [MyNewField] -> [My New Field]
Applies a case change to all the fields.
Uppercase: Replaces each lowercase letter with a corresponding uppercase char.
Lowercase: Replaces each uppercase letter with a corresponding lowercase char.
Capitalize: The first letter of each word will be in uppercase.
Extract substring components from a parent string field, where the original record fields consist of two or more parts separated by a delimiter.
The function can be used, for example, to extract the column name in a specific language if the field is multilingual.
*e.g. Applying a subfield of 3 with a delimiter of '/' [Client/Cliente/Customer] -> [Customer]
Delimiter: A character within the input text that divides the string into component parts.
Field no: Specifies which of the substrings of the parent string text is to be returned. Use the value 1 to return the first substring, 2 to return the second substring, and so on.
Adds an affix, either placed before the field (prefix) or at the end (suffix). Useful when reusing the same dimension over and over for multiple scenarios.
e.g. Using the customer dimension where a customer may be a Ship To or Bill To customer.
Prefix : [Customer Name] -> [ShipTo.Customer Name]
Suffix : [Customer Name] -> [Customer Name.ShipTo]
Affix: The text that will be used as an affix. Make sure to add a space to your affix if you'd like the new string to remain spaced out.
Installing the plugin
Visit the Store:
Visit my GitHub: https://github.com/MichelLalancette/SenseFieldFormatter
I have always wondered how to change the theme in application with native qlik sense extensions.
I am aware that there are extensions on the market for the same purpose but the challenge was how to do it with the objects in the application itself?
My solution is to chenge background layer but this can be apply on theme too, you just need to add your css for theme in multy kpi object :
1. Use Multy KPI extension and add some css. I add 9 multy kpi object with different css for background and add to master items.
2. Create variable vBackgroundLayer and for definition use number 1 or any other number what will be default background layer in app.
3. Add Container and insert all 9 multy kpi objects and add condition
=if(vBackgroundLayer=1,1,0)
=if(vBackgroundLayer=2,1,0)
=if(vBackgroundLayer=3,1,0)
.............................
.............................
=if(vBackgroundLayer=9,1,0)
4. Using 9 buttons we can change the background lyers by color and position
Button settings:
Action: Set Variable value
Variable: vBackgroundLayer
Value: 1
Action: Set Variable value
Variable: vBackgroundLayer
Value: 2
Action: Set Variable value
Variable: vBackgroundLayer
Value: 3
.........................
.........................
Action: Set Variable value
Variable: vBackgroundLayer
Value: 9
5. I don't need any more container to be visible for that purpose i hide the container adding css in my multy KPIs objects
[tid="vkbDYYG"].qs-container
{
display:none!important;
}
Hi all,
I have prepared a script that will calculate the MTD, YTD, QTD, WTD without using complex set analysis using the As-Of table concept.
One more App is attached : Which can create MTD/QTD/MTD in filter & we can use this in set analysis to display values like MTD/QTD/MTD.
Thanks
Vikas
Link Table :
Please find simple link table concept implemented with multiple fact tables. Hope definitely help new comers will help to clear concept of link tables.
Data Modelling is technique in qlik for linking tables we can use link tables concept please refer ppt .
Qlik Tips: Rules for creating a Key/Link Table in QlikView and this post
ref: https://www.analyticsvidhya.com/blog/2014/12/remove-synthetic-key-concatenation-link-table-qlikview/
Please find attached excel & data model containing how to implement a link table.
Attached Solution Linktable2
Hope this help to new comers.
Thanks
Vikas
I client recently requested me to align the colors used in all their apps' objects to their corporate colors
To avoid having to edit each app again in the future if the color requirements change, I decided to create a method to populate the color variables from excel, thus next time I simply have to update the color codes in the excel file
To scale this approach out to other future implementations, I have created the attached .qvf file and excel files.
The app also includes examples of how to incorporate colors using certain functions / methods:
- ColorMix()
- Data Brushing
- Pick()
- Pick(Match())
I also included my list of useful color related websites to help you with color selection and design
Hope this will be useful to you 🙂
This app has a number of objects that work together to allow you to see the frequency of values on any field in your own apps. The field is selected from a Filter Pane and then a Bar Chart object shows the frequency of values within the selected field. There is also a Filter Pane on the selected field, allowing searching on that field.
The objects can be copied and pasted into any Sense document, allowing this functionality on any data set.
A full tutorial on how to build the components in this app, using only standard Sense features, is given in a blog post which you can find here:
https://www.quickintelligence.co.uk/qlik-sense-data-profiler/
This app is a Sense port of our popular QlikView app, which can be found here:
QlikView App - Generic Data Profiler
I hope that you find the application useful. You will find other applications that I have uploaded under my profile on QlikCommunity or on our Downloads page..
Steve
Hi Qlikers,
Differently from QlikView, Qlik Sense applications are developed on the browser which means that identifying applications based on the interface becomes tricky. The configurations documented here were done to provide clear differentiation between Prod and Dev environments and do not affect the application, they have effect only on the environment. So, the application can be moved from Dev to Prod without any particular change on it.
Best regards,
Huberto Pereira Haidemann
Connecting to data sources is easy right? You simply use data connection manager, or choose a table from an existing connection right. The "wizards" insert the Connection string into the Load Script and you are off to the races for your queries.
LIB CONNECT TO 'Snowflake_qlik.us-east-1.snowflakecomputing.com (qlikpe_qlikservice)';
Then some yahoo says "Hey Qlik Dork the customer actually has 2 server instances and they needed the data loaded from both." Now you could simply duplicate the section of code and do the same thing for the second instance. It's not that hard after all. A cut here, a paste there, a CONCATENATE before a LOAD there and bingo ... 2 different server instances.
But your Spidey senses start tingling because you know what it really means is "The next customer might have 4, and the next might have 7." And since they will actually be the ones changing the code, you don't know for sure how proficient they are with their cut, paste, concatenate or bingo skills. But what can you possibly do, the connections are hard coded? Right?
Wrong. The compiler needs a connection string but the reality is it doesn't care how it gets it. Which means ... you can use a Variable for it.
Set vInstance = 'Snowflake_qlik.us-east-1.snowflakecomputing.com (qlikpe_qlikservice)';
LIB CONNECT TO '$(vInstance )';
I hear you out there shouting "But that doesn't achieve anything other than making the code more complicated!" But you didn't let me finish. Of course I'm not going to do my Set vDesc on a line by itself, I'm going to LOOP through the connections and set the variable vDesc inside the loop like this.
SnowflakeInstances:
Load * Inline [
SFConx, SFType, SFInstance
SF_AT, NotLive, 'Snowflake_attunity_partner.xxxxx.snowflakecomputing.com '
SF_PE, Live, 'Snowflake_qlik.xxxxx.snowflakecomputing.com'
];
Let vNumRows = NoOfRows('SnowflakeInstances')-1;
For i = 0 to $(vNumRows)
Let vConx = peek ('SFConx',$(i),'SnowflakeInstances');
Let vInstance = peek ('SFInstance',$(i),'SnowflakeInstances');
Let vType = peek ('SFType', $(i), 'SnowflakeInstances');
LIB CONNECT TO '$(vInstance )';
Yeah the customer with 2 different Snowflake instances is covered.
Yeah the customer with 3 different Snowflake instances is covered.
Yeah the customer with ... you get the picture. All customers is covered. 1 to N instances is all the same to you.
Let's say I am reading a Table called SESSIONS. My table header takes advantage of that vConx variable:
[$(vConx)_SESSIONS]:
And when I want to Store the data into a QVD so I can handle incremental loads, that variable is handy again:
Store [$(vConx)_SESSIONS] into [$(vQVDLocation)/$(vConx)_SESSIONS.qvd] (qvd);
What in the world is the vType variable used for? Does Live or NotLive even make sense?
It does in my particular use case. I have some very large instances that I need to read from for "my" testing, that I only have limited access to. Thus I need to connect Live one time, but I want to read the data from my QVD file when it's flagged as NotLive the rest of the time. A simple little IF THEN ELSE and I'm all set. I either choose to read the data from the server or simply read it from the QVD with no incremental loading.
IF (vType = 'Live') Then
If you were observant you will have noticed that I used a variable for the storage location as well as the QVD filename. Because you know the customers that receive this application will all create different Connection paths for the QVD files so I simply let them define it in the beginning of the code rather than requiring them to change it in every single section of the load script. Plus I'm cooking with gas when I deploy to SaaS and my storage is a different space and not just a file location.
I like to variabilize as much of my code as possible. It's either because I'm lazy -OR- because I'm dedicated to easily modifiable code -OR- both. 😀
Mapping Springfields or how to improve the lookup accuracy
The on-the-fly location lookup is one of my favorite features of Qlik GeoAnalytics and the native map in Qlik Sense. Just add a field and the map automagically places the assets using the field content. This article explains how on-the fly lookup works and how you as user can improve the hit rate.
How it works
The on-the-fly lookup in Qlik is powered by a vast database populated with location entries. It holds currently approximately 7 million features of different types: countries, regions, municipalities, populated places, airport codes, zip codes etc.
Point density of the Qlik Location Database
In most cases each place has several aliases for the same location in local language or just a different spelling. When the database is queried it responds back with a geometry. Most of entries are points but the database also contains many area geometries for well-known regions. The database also keeps a hierarchy of the entries, a place belongs to country and a region, in order to distinguish places from each other.
How to improve
I will use 'Springfield' as an example to show how to get better matches. Springfield is one of the most common place name in the US. I pulled a list of “Springfields” from USGS, an organization that keeps records of all populated places in the US. The list included city name, state and county information. I loaded the list in to Qlik Sense as an inline table, at the bottom of the page you can find a link to my test app.
Just Springfield = 1 hit
My first attempt is just to make a point layer and add the city field. With that approach I will get one hit for a Springfield in Illinois, US.
That's not so surprising, the lookup service made a best effort given information and picked the largest city with that name. Also, the city field only have one distinct value as the dimension controls the number of objects on the map.
Add id dimension, country and location type
As a first improvement I switch to an id dimension that holds a unique id for each city to get a fair chance to placing more cities. The dimension is also used for selections, so I prefer an id that is easy to read. For this app id is the string with the city, county, state, country.
Looking location tab for the point layer I can see that can fill in more context for location. I start by adding my field ‘country’ and set the location type to ‘City, place’.
That helped, now I get more hits, one in US and one in Virgin Islands, because Virgin Islands has it’s own country code.
Adding state information
City and country are not enough in this case to pin point the locations, so I continue by providing the field ‘state’ to the location tab. Apparently it is common to have several cities named Springfield in the same state.
The hit rate increases, with city and state I get 30 hits, there are 29 states in the US with one or more cities called Springfield.
Adding county information
To get even more hits I need to provide more context, luckily for me the list of cities also contained information about county, the 2nd level of administrative boundaries in the US. I add that field also in the location tab.After that more places were found, now 66 cities of the 67 were properly located.
The edit mode of Sense lets the map provide error messages for the location service. In this case only one city was not located, apparently Clayton county in Georgia has two places called Springfield.
Advanced usage, using a location string
As an alternative, the user can put everything (location name and type information) in the location string instead of using the drop-down menus:
=city & if(len(county)>0, ',' & county) & if(len(state)>0, ',' & state) & if(len(country)>0, ',' & country) & ':P*'
This produces the same result but is gives more control and might be more convenient for the advanced user. The ':P*' is the short hand code for a 'City, Place'. Read more about location types in the "Location Service Description" document in QGA documentation.
Testing city names at load time
Qlik GeoAnalytics provides an operation "NamedPointLookup" that can check how good the matching will be. This is convenient especially for larger address databases. In this example city names were processed. We got 1 hit on city level, 2 hits on country level, 30 hits on state level and 66 on county level. Check the load script for details on how to perform the NamedPointLookup.
Knowing which name to use
Most entries in the Qlik location database has several aliases, same place different spelling. The best way to find out the main name is use the Qlik GeoAnalytics connector and the "Load" operation. Here's an example to find out all the correct county names in the US:
Summary
Basically, the lookup becomes better with more context such location type, location spelling, location hierarchy. City names are often ambiguous, to resolve a common city name like "Springfield" info about the type, country, state and county are needed.
Check out the test app below: