67 – Create a Codebase

One of the reasons I started doing this blog was to have a place to store my random Qlik info. But even before this, over the years I have collected a number of code snippets that I can refer to whenever a similar problem comes up. So you don’t need a blog, you just need […]

68 – When to Upgrade

With Qlik Sense having 5 releases a year, it can quickly become overwhelming staying up to date on the latest release. And even then, should you even be on the latest and greatest? Here is what I recommend as a rule of thumb: when upgrading or installing for the first time, install the the second […]

69 – Mixed Granularity

There will always be situations where the data you get isn’t at the same granularity as the other. The benefit of Qlik is you can leverage the associative model to account for these scenarios. Some instances will call for a link table, others a concatenated fact, but in the end you will be able to […]

70 – Pick Match

One of the most resource intensive functions in a chart is the If statement. In a lot of scenarios, what you can do is leverage the combination of Pick and Match to replicate the functionality while increasing performance. Example: =If([Inventory Type]='Individual', Sum(Qty), If([Inventory Type] = 'Bulk', Sum(BulkQty)) Pick(Match([Inventory Type],'Individual','Bulk'), Sum(Qty), Sum(BulkQty)) If yo...

71 – Copy Paste

There’s nothing worse than waiting for a long reload to find out you made a typo. One thing I have made a habit of is copy and pasting script items: table names, field names, variables, etc… This is definitely a simple item, but it can save you a ton of time down the road. If […]

72 – Dual Set Analysis

By default you need to reference the display (read: string) value of a dual field in set analysis versus the numerical value. I personally think this is a weird behavior of Qlik, however it is what it is. The downside to this is that string operations are much slower than numerical ones. To overcome this […]

73 – Wildcard Load

One good thing to know is that you can use an asterisk * within a file name. Qlik will load all the files that fit the criteria. Say you have a directory named QVD, which has all of your QVDs prepped and ready for your data model. You can simply do the following to load […]

74 – SubField

If you are like me, you probably use SubField a lot. I had used it for years before I stumbled across one of its most powerful features in someone else’s code. If you do not provide the position parameter, it will expand a record for each value. I’ve worked with a few older databases that […]

75 – Arrays

Arrays and/or Lists are very common in programming languages. In Qlik scripting there are two ways to go about creating an array of sorts. The first way is storing a list in a variable: SET vCount = 'One','Two','Three'; for each i in vCount     Trace ------------ $(i); Next i The second way is by using a […]

76 – Remove Unused Fields

I can’t tell you how many times a client has said to leave a field in the data model just in case they want to use it later. Just don’t do it. Take it out now, if they want to use it later, then bring it in later. You can easily set up the app […]