All posts by Rob Wunderlich

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

Name That QVW

Recommendation: Give all your QVW files unique names.  Do not, for example,  maintain both;

Sales\Dashboard.qvw
Finance\Dashboard.qvw

Instead do:

Sales\SalesDashboard.qvw
Finance\FinanceDashboard.qvw

If you want to stop here at TLDR (Too Long Didn’t Read) just take the recommendation. Use unique names. For the geek crowd, read on,

The reason for preferring globally unique names is metadata.  QlikView provides a number of different tools and facilities for scanning QVWs that provide useful (metadata) information for managing your pool of QV documents. Among them are:

– The lineage elements in a QVD that tell you what QVW created this QVD.

– QvsAdminDataProvider.dll that exposes information on user created server objects and ownership.

-QvServerObjectConnector.exe that exposes information on the Dimensions and Measures used in those server objects.

– A scanner you may write yourself (or one of my tools) that reads information from QVD or QVW files.

Each of those providers may use a different full path representation for the QVW file.  These differences result in a different  “identity” for the QVW and create difficulties in coalescing these very useful bits of information together to the common QVW file.

The lineage elements record the path at reload time, which is probably the server path, which does not align with the mapped drive you use in your scanner app.

QvsAdminDataProvider uses Access Point paths, which are URL paths like:
Dist/Sales/Dashboard.qvw

QvServerObjectConnector uses physical paths to the .shared file which are like:
X:\qlikvewserver\DistributedDocuments\Sales\Dashboard.qvw

These different path points of view make it difficult to tie the information together. If we can assume that the qvw name “Dashboard.qvw” is an identifying key, there is much insight available by combining these various metadata sources,

Bottom line. Give your QVW files globally unique name to get the most leverage of the metadata.

-Rob

There are still seats available for the San Francisco Master Summit for QlikView. Join us to learn about Advanced Scripting with me, Visualization Techniques with Bill Lay, Data Modeling with Barry Harmsen and Advanced Set Analysis with Oleg Troyansky.  I’ll also be showing off some cool analysis of metadata such as what Dimensions and Expressions your users are using in their Server Objects. 

 

 

Share

Info on INFO or What is the “i” for?

You may have noticed that “i” icon appearing in a QlikView listbox and wondered “why is it there?” and “what’s it good for?”. Or you may have seen script “INFO LOAD…”and wondered what it did.

The “i” icon and INFO LOAD are both associated with the QV Info feature which has some interesting and useful applications.

Some INFO is created for you right out of the box with no effort required. Create a listbox for Field $Table.  (If $Table is not available in your list of fields,  Right-Click, Select Fields and check Show System Fields).

Select one $Table name The “i” appears in the caption when one value is selected.

Clicking the i will display information about the table source. If the table was created from a database, the SQL statement is shown.

If the table was created from an excel or other local text file, the external file will be opened!

Internally, INFO is a two column table that associates a Field value with an external image or data file. The $Table example shown above was created automatically. You can create your own INFO tables using the INFO LOAD script statement. The following  script connects OrderNumbers with the associated Invoice PDF file.

[qlikview type=”qvs”]
InvoicePDF:
INFO LOAD * Inline [
OrderNumber, InvoiceFile
SO67707, PDF\Invoice_SO67707.pdf
SO67710, PDF\Invoice_SO67710.pdf

[/qlikview]

Clicking the i opens the associated PDF file in Adobe Reader or the default application for *.PDF on your machine.  If the file is not physically available, the the text string “PDF\Invoice_SO67707.pdf” will display in a popup.

For Access Point usage, note that opening external files in this way does not work from the Ajax client. It does work with the IE Plugin or Desktop client. (The workaround is to use Open URL Action).

Note that tables created using INFO LOAD do not appear in the Table Viewer.

A common use of INFO is image files. The  optional prefix, “BUNDLE”, may be used to include the external file contents in the qvw itself. This is done for portability, as the files need not be available at runtime (works with all clients).

[qlikview type=”qvs”]
T1:
BUNDLE INFO LOAD * INLINE [
Fruit, val
Cherry, Image\Cherry.jpg
Banana, Image\Banana.jpg
Apple, Image\Apple.jpg
Lemon, Image\Lemon.jpg
];
[/qlikview]

Note that the name of the second field (“val” in this case) does not matter as it is never referenced in expressions or the UI.

We can use the Fruit INFO in a number of ways.  First we can use the field Fruit in a listbox and select “Info as Image” Representation on the Presentation tab:

The listbox will show the associated images instead of the text. Sort and Search in this listbox will use the Fruit text values, as we might expect.

Once again, when a single Fruit is selected we get our friend i. Clicking i will display the image in it’s original size in a moveable window. The window remains until the user closes it.  You can pull up multiple images side by side and arrange them. Imagine pulling up multiple insurance claim or property photos.

Another way to utilize INFO data is in an expression using the Info(fieldname) .  In the Straight Table below I’ve used the expression Info(Fruit) to create the second column. The Representation for that Expression has been set to “Image” on the Expressions pane.

The  Info() function produces results only when there is one value for the given context.  In a Text Object,  Info(Fruit) would produce a null value as long as there is more than one Fruit possible.  In this way, Info() works similar to the Only() function. Unlike Only(), Info() does not accept a Set expression to select a specific value. That kind of conditional logic requires using the qmem syntax instead of Info(). (For more on qmem, see the Help for BUNDLE ).

So what happens if we try to BUNDLE LOAD non-media files like excel or PDF? Disappointment I’m afraid.  They will load. Your qvw will get larger. However the Info display won’t work correctly. You can of course leave off the BUNDLE prefix for those file types and make sure they are available at runtime to the user.

Info can also be invoked as an Object Action.  The Action is “Show Information” and it can be found in the External Action Type.

Have fun and let me know how you use INFO.

-Rob

PS  I hear the early bird discount for the May SF Masters Summit has been extended. See the news here

Share