As your QlikView deployment grows in size it can quickly get unwieldy unless you start imposing some sort of structure and standards to it. In Computer Science we sometimes talk about Separation of concerns, http://en.wikipedia.org/wiki/Separation_of_concerns, although it is not 100% applicable for QlikView it does make sense to try to split the different pieces of a QlikView document apart into re-usable components.To help you with that QlikView has the functions Include and Must_Include.Essentially what this allows you to do is to create reusable snippets of load script that you can then re-use across your deployment. All of those connection strings to databases are prime candidates for a include statement, 1 statement that can be referenced from multiple documents and 1 place to change it when your connection string changes. Connection strings are just one example, I've used it in the past to store the corporate graphical profile as variables that I can then include in all my documents or why not a standard calendar and date formats?Our own Qlik Deployment Framework also heavily relies on Include statements to allow apps to be portable between different servers and to promote code re-use. You can join the QDF group here, QlikView Deployment FrameworkSo how do I use it?To quote the help file,
$(Include =filename )$(Must_Include =filename )
The include and must_include variables specify a file that contains text that should be included in the script. The entire script can thus be put in a file. This is a a user-defined variable.
The difference between include and must_include is that include will fail silently if the file is not found during script reload, while must_include will throw an error if the file is not found.
Examples:$(Include=abc.txt);$(Must_Include=def.txt);
We make use of dollar sign expansion to expand the contents of an external file into our load script.The file path supports both absolute and relative paths making it ideal for portability between test and production servers.If you ever were a fan of Inception then you could start structuring your Include statements with nested dollar sign expansions to manage where to load the Include files from,
let env = '<A absolute or relative file path, for example ..\Config\Test\>';$(Include=$(env)\ConnectionString.txt)
This will also be my last post for the Design Blog, unless I make a guest appearance , so I hope you have enjoyed reading my posts as much as I have enjoyed writing them.
...View More
Hello Qlik Community! In this post, I’d like to introduce you to today’s guest blogger and Qlik enthusiast, Jason Yeung. Jason is our North East Solution Architect Manager who has over 15 years in the BI industry…flexing his muscles in Pre-sales, product management, consulting, and support. Jason wanted to get healthy, but traditional means of health data tracking weren’t enough. Continue reading to learn more about why Jason applied Qlik Sense to his fitness plan and how it was a better alternative to traditional fitness tracking methods.This past year, I decided to get in shape. Over the years, I went from being an avid runner to a car service, driving my children to hockey rinks on the weekends. This year, things were going to change. I had a strong plan, motivation, and allocated the right amount of time to be successful. However, I needed an analytical tool to track my progress and keep me honest.The Analytics Problem with Fitness AppsToday, we have access to data around our personal well-being and there are data collection tools everywhere. We wear them on our wrists, have them in our pockets, and have them built into our treadmills. While these tools serve as great motivators, they all seem to fall short in 3 key analytical areas:Data in, not data out. These tools do an excellent job collecting large amounts of data, but tend to fall short when it comes to analytics. They often provide summary level dashboards that just show fitness activity over time, but with limited abilities to explore the data further.Lack of self-service. My fitness “dashboards” are never quite the way I want them. Everybody uses slightly different metrics and different ways to visualize their fitness activity and it seems we are limited to static dashboards that can’t be modified easily.I want “other” data. No one fitness tracker really tells the whole story because they’re all used for specific purposes. Additionally, these “apps” are all isolated from one another with no unified way to bring the data together, especially data from other sources. This is important because when it comes to physical fitness, we tend to only see the data relationships and associations that we want to see.Enter Qlik SenseAt Qlik, I’m constantly working with customers and prospects to build and develop innovative analytical solutions to solve their real-life complex information needs. Qlik Sense provides these organizations with an analytical tool that enables them to build dynamic and interactive dashboards from many different sources of data. As you can see, this is the same problem that I’m trying to solve, so I put Qlik Sense to the test.What I didHere’s a two view dashboard that I built to track my fitness activity. At first glance this may not seem to be any different than other fitness dashboards, but the fundamental differences are as follows:Data from four different data sources. RunKeeper, Fitbit, Weatherbug, and my personal data entry spreadsheet. Therefore, no more isolated views of data.No modifications or “massaging” of data needed. I was able to use the applications’ “out-of-the-box” functionality to export the data as-is and combine them together.Personalization. I was then able to build my own custom visualizations tailored to how I wanted to see them.Speedy. Based on my knowledge of Qlik Sense, I was able to easily load the data and build the visuals very quickly, while gaining additional insight from the data of the various tracking devices.The Biggest Insights Can be Simple to DiscoverThe previous dashboard view was extremely effective in tracking my fitness activity. But the dashboard itself really didn’t shed any new insights. However, the additional data from Weatherbug did! For runners, weather can be the single biggest motivational driver. In the visuals below, there are two main discoveries.The weather varies from week-to-week, but my weekly running activity remained relatively constant:But the “type” of day played the biggest role. I noticed that while my pace and distance doesn’t significantly change based on temperature, the outliers on the right suggests that I typically only run on “Clear” days.Telling the StoryAfter analyzing all this data, I needed to build a story to communicate the meaning behind the numbers. Using Data Storytelling, Qlik Sense allowed me to build a dynamic presentation with a narrative to highlight my overall activity. I wanted to share this information with my support structure, my family. And the main point to communicate was:The ResultWhat was the outcome of all this? My wife bought me a windbreaker! In summary, as you can see, analytics is all around us. In addition to being a top priority across all organizations, it should be a top priority for individuals to better manage their health. Using data to gather and build new insights allows us to be more productive, make better and more informed decisions, and hopefully live healthier lives. Being able to communicate your findings effectively increases your chances of getting the message heard and understood. I used Qlik Sense to unleash my intuition and so should you. Download Qlik Sense today for free.Jason YeungQlik
...View More
One of the cool things I love about working with data is that very moment after a few minutes exploring a data set when you discover something unexpected in a chart or when you stumble upon a fact that makes a difference and it all becomes clear to you.I've experienced that "aha moment" quite a few times and still makes me feel good. When that situation happens I feel in the urge to share my discovery with the world, so I blast my colleagues, friends, and pretty much everyone I talk to.If the sudden discovery finds you using Qlik Sense I have some good news for you, it’s called Single Configurator.
The Single configurator is a Qlik Sense feature that provides an easy way of creating simple mashup pages without having to write any code at all. It returns a Qlik Sense object, which is identified in an URL. The Qlik Sense object is typically a visualization from an app, for example a Bar chart.
To get access to the Single Configurator functionality you just need to open your favorite browser and type your Qlik Server* url followed by the word single, something like: https://<ServerName>/single.Once you are here you should get access to all of you hub's apps. The next step will be picking one of the apps and then choosing the object you want to share.Notice that you have access not just to each one of the app’s objects but to the app’s sheets and even to the snapshots.Single Configurator also provides you with three very useful options, you can pick whether or not you want to include the current selections bar, and you can turn off chart animations and/or interaction.If you are still thirsty for more options please check the developer help webpage. In there you will find ways to pass selections in the url, apply bookmarks and more.So now it’s up to you how to share your discovery. You could copy the chart url and share it via email with your peers or you could iframe it in a webpage as we did for Valentine’s Day app. (http://valentines.qlik.com/)Qlik Sense features the “aha moment” out of the box, so you just need to focus on finding that thing that went unnoticed for the rest of us and share it with the world.Enjoy Qliking!AMZ*For those of you who still doesn't have access to a Qlik Sense Server you can still see the Single Configurator in action. With Qlik Sense Desktop running, you access the Single Configurator via the following URL: http://localhost:4848/single.
...View More
Last year I wrote a blog post on how to set Sunday as the first day of the week, instead of using the ISO 8601 default. This is fairly straight forward – all you need to do is to write some formulas in the script. See Redefining the Week Start.However, if you use Qlik Sense it has become even simpler. You don’t need any custom formulas and usually it just works - without you doing anything.When you create your Qlik Sense app, a number of environment variables are created in the beginning of the script. These variables are based on regional settings of your computer, so usually you don’t need to change any of them. One of the variables is “FirstWeekDay” and this defines which day of the week you want to use as your first day.If you want Monday, then you should use Set FirstWeekDay = 0; // 0=Mon, 1=Tue, ... , 6=SunAnd if you want Sunday, you should use Set FirstWeekDay = 6; // 0=Mon, 1=Tue, ... , 6=SunChange it if you need to!This variable is used as default for several functions, most notably WeekDay() and WeekStart(). So when you call these functions, you will automatically get the correct week start and the correct order of the week days.If you use FirstWeekDay=6, you will get a result like in the picture above. You can clearly see that both the order of the week days (in the filter pane to the left) and the week starts (in the pivot table) are correctly defined. I have used US settings and the following expressions to define these fields: WeekDay( Date ) as WeekDay, WeekStart( Date ) as WeekStart, WeekDay( WeekStart( Date ) ) as [Day of WeekStart],The environment variable changes the defaults of these functions, but you can of course also override the default by using an explicit parameter in the function call: WeekDay( Date, $(MyFirstWeekDay) ) as MyWeekDay, WeekStart( Date, 0, $(MyFirstWeekDay) ) as MyWeekStart,With Qlik Sense, we have made the date and time management a lot easier.HICPS This functionality does not yet exist in QlikView.Further reading related to this topic:Ancient Gods and Modern DaysRoman Emperors and the Month NamesRedefining the Week StartRedefining the Week Numbers
...View More
Some time ago I wrote a blog on Mapping functions and described how they can be used to replace or modify field values when you run the script. But how do you know when to map versus join the data in your data model? Mapping works well when you need to look up a single value in another table. For instance, you may have a products table with product data like the table below and you want to add the product category name to that table.The product category name is in another table that looks like this:Now you can add the ProductCategory field to the Products table by doing a join and that would work fine but you can also add the ProductCategory field by simply mapping.Using a join:Using a map:Since we only want to add one value to the Products table, mapping is a safer option. With this small sample data, either will work but sometimes when you have a large data set, you have be cautious when using joins. You need to watch out for new records being added to the table as a result of the join thus potentially changing calculations.While both a join and a map can work to combine data from two tables, in cases where only one value needs to be added, choose to map. It is an easier approach and it reduces the chance of errors being made in your data model. Now I am not saying that joins are bad and should not be used because that is not the case at all. I am simply stating that mapping should always be used versus a join when you only need one value.Thanks,Jennell
...View More
The responsive design of Qlik Sense allows apps to be developed once and deployed anywhere. This makes the developer’s life easier but there are still a couple of things to keep in mind when you are building your app.Object Positioning – On a small device like a phone, Qlik Sense will redisplay the page by ordering objects in a single column. The order of displayed objects is determined by a top to bottom, left to right fashion. Meaning that the object that sits in the top left corner of the full dashboard will be displayed first, next the object to the right of the first object will be displayed. So if you are going to build out a dashboard, it makes sense to build it horizontally and not vertically.Chart Titles and Subtitles - Using chart titles and subtitles ensures that objects can be interpreted by the users who are looking at your chart as a single object. Text and Image Objects - I would recommend that you use text and image objects wisely. In small device mode, images and text can look out of place as they shift positions to accommodate the viewing area of a small device. So if you keep small devices in mind when you are building your app, you can be sure that all users will have the best user experience possible. Happy Qliking!
...View More
Qlik Sense uses Attribute Based Access Control (ABAC) as a basis for its security. In this post I will explain why we decided to implement this, and give you an understanding of the future of access control.Is it only Qlik that thinks that ABAC is the future of access control? NoWhen Gartner predicts the future of access control, they say“By 2020, the majority of enterprises will use attribute-based access control (ABAC) as the dominant mechanism to protect critical assets, up from less than five percent today.” (http://www.issa.org/resource/resmgr/JournalPDFs/feature0614.pdf)And the National Institute of Standard and Technology (NIST) has released a special publication to raise awareness and help with making effective implementations of ABAC (NIST SP 800-162 http://nvlpubs.nist.gov/nistpubs/specialpublications/NIST.sp.800-162.pdf)If this is the future, what is then ABAC? I have taken the liberty of changing the NIST definition of ABAC to be consistent with the syntax (marked in bold green) that is used in Qlik Sense.An access control method where user requests to perform actions on resources are granted or denied based on assigned attributes of the user, assigned attributes of the resource, environment conditions, and a set of security rules that are specified in terms of those attributes and conditions.This sounds pretty generic. So why is ABAC seen as an important step into the future of access control?The first major benefit is that with ABAC you can implement other well-known access control methods such as mandatory access control (MAC), identity based access control (IBAC) and role-based access control (RBAC). This makes it very flexible and therefore suitable to solve most company’s security needs.But are there other benefits? Yes.You can develop an access control policy independent of usersWe have a language that can be used to describe security policies that Qlik Sense understands and be used to enforce the security controls needed.Accommodating the unanticipated/external userWe can describe the security controls using attributes of resources and users. With this approach new users accessing the system will be in compliance with defined policies, and access will be granted based on the assigned attributes. No additional configuration is needed in Qlik Sense.Avoid role/group explosionUsing logic conditions in our rules, we no longer need to create new roles/groups to grant new subsets of user access.Easier managementThe administrators of the system don't need to understand or change the security policy; they only have to ensure that resources and users are correctly described by their attributes for them to be in compliance with the security policy.Cater for taking more things into consideration for security decisions such as dynamic attributes (environment)With ABAC we can start using the environment (the context in which the security decision is made, e.g. if the connection to the system is encrypted or not) to describe our security policy.Hopefully this has provided you insights to why ABAC is the future of access control and the benefits this will bring to your Qlik Sense deployments. If you have questions on this blog post or have ideas of what you want to read in the future please don’t hesitate to comment this post.
...View More
A skill set rarely discussed in the BI narrative is that of data literacy. Much is made of newer & more advanced visualizations, but the ability to understand what you are seeing and make smart decisions from that is incredibly valuable. Only a person with a great degree of data literacy can successfully both read & manipulate complex data to arrive at meaningful insights.Reading & WritingData literacy comes in two parts: the front-end and the back-end. On the front-end a dashboard page requires the lowest degree of data literacy. Most people can read a well designed dashboard page and understand the general status of things. It is when the user advances to pages intended for critical analysis that the bar rises and users begin to drop out. Real analysis requires a data literate audience to get to the root cause of a KPI's status.Marching hand-in-hand with front-end literacy is back-end literacy. While a great dashboard may not require much data literacy from the users it required a greater degree of data literacy from the person(s) who built it. What is the data being measured? Where does it come from? Are there compatibility issues between the data sets in an application? Building new visualizations or manipulating existing ones require familiarity with the data as well as how complex that data source is. Working with a simple data set requires relatively little data literacy but the more complex the data the greater the need for a data literate developer. Creating new objects is more than just technical development knowledge - it is understanding what you are measuring and why you want to measure it. Data literacy is often overlooked when it comes to the skill set of a great developer.Increasing the data literacy of your organization, and yourself, is the key to spreading BI to the masses.
...View More
One of the strengths of QlikView is its search engine. With it, you can find pieces of information in a fraction of a second and select the found field values. But how is the search defined? And where can the search be used?