All posts by Rob Wunderlich

SR11 Error Handling Changes

SR11 introduces two changes to error handling that you should be aware of.

The first change is that syntax errors marked with the “red squiggle” in the expression editor will always generate a status message of “Errors in expression”. This was not the case prior to SR11.

In SR10 and prior there could be a difference of opinion between the red squiggles and the status message. Valid syntax such as this–

SR10

in SR10 could be marked with squiggles but the “Expression OK” message would reassure us that this was just a syntax checker bug.

In SR11 the status message will always be “Errors in expression” when a red squiggle appears — even when the syntax is valid.

SR11

This applies as well to the very common squiggles that appear when using set expressions with variables. Again, this is a functional expression:

SR11

So now the squiggles and the status message are in alignment. I’m not sure this is a good thing. We  can no longer say “Ignore the squiggles. If it says ‘Expression OK’ then it’s fine”. If this change sticks then we will have to get more aggressive about reporting and fixing syntax checker bugs.

The second Error Handling change you should be aware of is documented in the SR11 release notes. Charts that contain invalid expressions will now fail to render. In SR10 they assumed some sort of default and the chart was rendered. This new behavior applies to chart expressions,  dimension attributes and expression attributes such as Text Color. If any of those expressions are in error, you will get various error messages in the chart frame. I don’t understand  the pattern of the messages yet.

The good news is that this behavior is not implemented in Server until you explicitly turn it on with a Server Settings.ini switch. By default, Server charts will continue to render as they did in SR10. When you turn the setting on, the Server will log the “bad charts” to the event log. Unfortunately, the logging does not happen until you activate the new behavior. This means your logs and your users see  the problem at the same time. Pity we can’t log before we turn the option on.

So what’s the combination of these two changes? If the syntax checker declares a perfectly good expression to be bad will the chart render? Yes, it will render. The syntax checker’s opinion and the actual evaluation of the expression are not connected.

I’m still trying to understand how these changes will affect my customers and I am holding off recommending SR11 until I can experience a few upgrades. If you have some experience good or bad with these changes please leave a comment.

-Rob

Share

Currency and Other Symbols on the Y-Axis

Bill Lay showed this one in his Tips & Tricks session at the “Masters Summit for QlikView” in San Francisco.

How do you show a currency symbol on chart y-axis values?  It requires two steps:

1. Assign the format, like Money, in the Number format.

2. Here’s the trick — set a value for the axis “Static Step”. 

The resulting chart will include the “$” on each value of the axis.

There is an odd bit about this behavior. If the chart is not tall enough to show the Static Step increment, QV will revert to not showing the “$”. I’ll reduce the height of this chart to demonstrate.

You can display units other than currencies,  for example meters. Use the text in the Number format like “#,##0 meters”.

One more odd bit to be aware of. Remember I said the text part will not display if the chart is too short? An exception is made if the chart is tall enough for every line on the axis to have a value. If every line is filled, the text is shown, regardless of the increment used.

Let me demonstrate with the Length chart. I’ll set the Static Step property to “1”.  As expected, the “meters” text will not display because the chart is not tall enough to show increments of 1 meter.

Now watch what happens when I increase the height of the chart:

As soon as every line of the y-axis contains a label, “meters” appears, even though the increment is still much larger than 1.

Join us at a future Masters Summit for more tips from Dr Bill. I will be presenting along with the rest of the Masters crew in New York City in September and Copenhagen in October. See you there!

-Rob

Share

Function Survey Results

Last month  I made an appeal in this blog for developers to run a tool that would scan QVWs and contribute anonymous data to a study. Sixty one sites have submitted data so far. As promised, I’m making the results available for download and analysis here.

It turns out to be a pretty interesting data set — if you are into QV. The available data is limited by a few design points of the collection:

1. All returned data had to be absolutely anonymous. This required that counting be done in the scan. I could not bring back the actual expression text.

2. The scanner should not open the document. This means that script  was not examined. Only data available in the QVW XML was used.

As a representative sample of the QV world, the sample size is rather small and probably suffers from a significant selection bias.

Please also note some specifics of the counting. Functions in variables were counted, but only once. “Sum()” in a variable was counted as 1 use of Sum, even if the variable was used in multiple charts.

There are some interesting outliers in the submissions, which are intriguing to look at on their own.

So don’t use this dataset it for your PHD thesis but have fun with it. Here are some insights I found.

I would have never guessed that the number #2 Function was “If”!

I used  a couple of different ranking formulas throughout the analysis, but If() comes out a solid number #2 no matter how you look at it.

This led to another question (there’s that Data Discovery thing): Is there a relationship between the use if Set Analysis and the use of If()?  Not surprisingly, there is a strong correlation.

I’m of the mind that Set Analysis can be overdone and make an app difficult to maintain, vs building function into the data model. I don’t have an exact figure, but I frequently suggest to students that a max of 30% expressions with SA feels about right. It’s a really rough number meant to illustrate the concept that good data modeling is core.

Let’s assume that Swedes are excellent QV developers. There were three submissions from Sweden:

They look pretty good to me. There were submissions from experienced developers whose work I was familiar with and their SA usage tended to fall in that 30%-40% range as well.

What about Objects? I found a couple of surprises there.

I was surprised that Text Object beat out List Box for the top spot. But the biggest surprise to me was that Button made it in the top 5. I’d love to know what all those buttons are for. If you assume that many people use Text Objects with Actions as a Button substitute,  there are even more “Buttons” out there.

There is lots to explore in the data. The analysis has popup and drill down detail so explore with your mouse. And of course create your own visualizations and post your insights here.

Sites that submitted data can select themselves for comparison by selecting the unique submitted QVD name.

I will update the Survey Results app when I receive more data and of course, when you point out my errors J

-Rob

 

 

Share

Those Uncaught STORE Errors

Every software product has it’s bits of tribal lore, those unintuitive quirks that when revealed make you say “aha!” and feel empowered to mentor others.

A QlikView factoid of this variety is that: “General Script Error” from  a script STORE  statement usually means that the target directory does not exist.  For example, a “General Script Error” from the following statement  if “somedir” does not exist:

STORE mytab INTO somedir\mytab.qvd;

it could actually be any type of output file error. Could be missing directory, could be  locked file or an illegal file name, You know this. You’ve been using QlikView for some time.

I include this tidbit in my beginner classes, and the students are usually grateful to be receiving these “inside tips” .  But occasionally, I get a Programmer type in the class who slowly raises one eyebrow Spock fashion and asks “Why doesn’t it throw a ‘Directory not found’ message'”?  I’ve never been able to give a satisfactory answer to that question,  (This is usually when I announce lunch).

Someone pointed out to me recently that:

SET ErrorMode=0;

Which is supposed to allow Script to continue after errors, does not affect  STORE output file errors. That is, the script still fails with “General Script Error”. This is because the STORE file error is Uncaught/Unhandled.  You’ll recognize this construct if you’ve done any programming.

It’s not like Script can’t catch IO errors. For example, input errors are handled just as you would expect. These statements won’t cause the script to stop even though “foo.bar” does not exist:

SET ErrorMode=0;
 LOAD X FROM foo.bar;

Most of QlikView — both script & UI — fails and recovers extremely gracefully. I don’t know why STORE seems to have been left out in the cold.

-Rob

P.S. I’ll be at Qonnections next week. Let’s see how many of us can ask “Why doesn’t STORE catch output file errors?” at the R&D Q-Bar. J

Share

Cell Popups in Straight Table

Last week my Masters Summit colleague Kevin McCann showed me a cool technique for generating popups (hover text) in individual cells of a Straight or Pivot Table. This can be useful for providing contextual info like order line detail:

 Or contact info when hovering over a name:

The Dimensions are created as multi-line Calculated Dimensions. Sorting and selections work as expected. If not done correctly, selections will be made in the referenced fields of the popup as well. The trick to avoiding the secondary selections is the use of aggr(). Customer is defined as:

[qlikview type=”exp”]=Customer & chr(10)
& aggr( EmailAddress & chr(10)
& Phone
,Customer )[/qlikview]

A complete example with instructions can be downloaded here: Qlikview Cookbook: Cell Popups In Straight Table

-Rob

Share

QVPR Analysis Tool Adds Task Visualization

Ralf Becher has created a nice Icon Graph extension and used it to visualize Reload task structure within my QVPR Analysis tool. I’ve integrated Ralf’s script into V2 of QVPR Analysis and all you need to do is download and install the Icon Graph extension from https://github.com/ralfbecher/QlikView_Extension_IconGraph.  Links are also provided in the QVPR Analysis qvw.  Select some Tasks or Documents and you’ll get a visualization like the following.

Ralf Becher has done some really interesting work with Graphs and Neo4J. Ralf is presenting a session (T56) at Qonnections on Wednesday afternoon if you want to learn more about using Graph models and visualizations in Qlik.

-Rob

 

Share

Please Help With Function Survey

I was recently working with a customer developing training curriculum and the question was asked “what expression functions do  developers use most”. I thought it was a question worth getting a specific answer to. So I’m creating a community project to gather data on what QV functions and features people use.

Please help out by downloading this QVW and following the instructions in the file to scan  your installation’s QVWs. You only need to configure a file path and press reload. The scanner will gather anonymous information and produce a QVD that should be emailed to me per the instructions in the file.

  • The scanner runs fast — about 60 QVWs per minute or better.
  • The survey QVD contains only counts of function usage — such as how many time sum() is used.
  • No private information is included in the survey QVD that you return to me. There are no qvw names, no userids, no expressions no fieldnames or data.
  • I will make the collected data freely available to the community for analysis.
  • I prefer that you run against your production or QA, just to eliminate the extra copies and backups that appear in a dev environment. If you can’t scan production, please go for the cleanest directories possible.

Why should you take the time to help me on this?

1. You may gain some insights from the data.

2. I help you out with free tools like Document Analyzer, QVPR Analysis and the QlikViewCookbook. Time to return the favor.

Thanks in advance!

-Rob

 

 

Share

Document Analyzer Numeric Field Recommendations

In the latest release 2.4  of QV Document Analyzer I’ve started the process of adding “Recommendations”, highlighting specific areas where potential improvement may be made to your document.

The recommendation included in this release is “Numeric field sizes”. Numeric fields that occupy more than 8 bytes of storage per value will be flagged. They will be highlighted on the Fields sheet and additional details will be provided on the Recommendation sheet.  The potential savings from “fixing” the field is also shown.

So what is this 8 byte thing? Ideally, most numeric fields (which includes timestamps) can be represented by 8 bytes of storage. In the Number format property or the script num() function you assign a formatting mask to be used for string representation.  QV stores the 8 byte number and applies the mask at display time.

Occasionally, particularly when doing an un-optimized load from QVD, the data can wind up being saved as “Mixed” which means both the numeric and string representations are stored for each value. So you may see Symbol widths of 17, 20, 24 or even greater for this field.

In larger apps with many unique numeric values, I’ve found significant memory savings by restoring these Mixed fields to a numeric format.

The usual tuning and optimizing caveat applies here. Don’t spend effort recovering a few megabytes. You have better things to do. But if you are wrestling with the megabeast app, fixing the biggest of those fields may be worth the effort.

-Rob

Share

Nprinting & Qlik Sense Sessions Added to SF Masters Summit

We’re pleased to announce that new sessions on Qlik Sense and NPrinting have been added to Day 3 of the May 4-6 Masters Summit for QlikView in San Francisco.

Vizubi, the creators of NPrinting, have been enthusiastic sponsors of past Masters Summits. In February 2015 Qlik acquired the NPrinting product. On day 3 of the SF Summit, Andrew Porsley of Qlik will provide a technical overview of NPrinting.

  • Design and Create NPrinting Reports
    • Set up data connections
    • Create Excel reports
    • Design PowerPoint reports
    • Emailed reports
  • Delivery & Distribution
    • Schedule and deliver NPrinting documents
    • Set up report recipients, report filters and conditions
    • Deliver reports based on jobs, tasks and schedules
    • On-Demand Report Delivery
  • Administration
    • Architecture
    • Server Settings
    • Monitoring

We’ve also added a Qlik Sense session titled “Qlik Sense for QlikView Customers”. Topics will include:

  • Leveraging existing QlikView assets in Sense.
  • Coexistence.
  • Mashups.
  • Extensions.
  • Opportunities for Sense.
  • Migration tips and tools.

Hope to see you at the SF Summit! Seats are still available,

-Rob

 

Share

QlikView Components Doubles Down

Version 10 of the QlikView Components scripting library added a number of new subroutines and functions when  Matt Fryer  merged his QVACB library into QVC.

Check out some of the Excel-like functions Matt has added;  NVL, DateDiff, InRange, Days360.  Also new workhorse routines like segmenting QVDs, emptying QVDs and loading Icons.

Along with Matt’s code, we also get Matt on the QVC team ! Matt brings fresh ideas and significant technical talent to the QVC project. You  may recognize Matt as author of the QV syntax plugins for Notepad++, UltraEdit and WordPress.  I’m pleased to welcome Matt as co-administrator and contributor to the QVC project.

The free open source QlikView Components (QVC) library can decrease the time you spend on scripting, improve the quality of your script. and let you share and leverage the experience of QV developers worldwide. If you have questions about QVC, use the QVC Forum here.

-Rob

Share