Saturday, November 1, 2008

Expression Overview


If you work with moderately complex reports then you must be working with reports with expressions. Most of the time we're concerned with expressions in chart objects (the graphs or tables with dimensions) but there can be expresssions in many places in a QlikView document. An expression might control whether a tab or chart is visible or not or it might control colors used in a chart. An expression might be used in a text object to provide customized information or a warning, or it might be used in a chart title to provide a customized title. In version 6 the only way to maintain these expressions was to remember where they are and open up each object to check on specific expressions.

In recent releases of QlikView there's a great feature called the Expression Overview. To see it, select Properties->Expression Overview (or, hold down the ctrl key, the alt key and the E key at the same time). This overview shows you where the expressions are in your document, it can show you the text of the expression, it will allow you make changes to the expression, you can search for specific text in the expressions like a field name or variable name, and you can do mass changes with the search and replace functionality.

There's no HELP button but you can make the Expression Overview Help screen appear if you press your F1 button. The Help screen will explain the available functions.

As always, if you are going to make serious changes to a document it's a good idea to make a backup copy of the document first, just in case you make a mistake and want to restore the document back the way it was.

My own preference, when I want to search for a particular kind of expression or if I just want to review all of the expressions in a report looking for problems and opportunities is to use the Export button to export all of the Expression Overview data. A box will appear asking for the pathname to use for the exported text file. The text file is a tab-delimited text file that can be reviewed with Notepad or Wordpad or a spreadsheet (or loaded into QlikView!).

The exported Expression Overview text file makes an excellent addition to documentation for a complex report for those of you who are required to produce documentation.

Note that expressions from hidden charts and other hidden objects are not included in the Expression Overview. This can be a good way to intentionally limit some of the expressions shown if you can hide specific objects. For myself, before I use the Expression Overview, I usually go to Document Properties, Security tab, and temporarily click on Show All Sheets and Objects. That way I get an overview list of every expression in the document.

2 comments:

Francois Wiid said...

Hi Tim

Have you found a way to export the expressions externally maybe via a vbscript, macro or commandline parameter?

I would love to export this info automatically.

Regards

-TB said...

In version 9 you can export the sheet layout to an xml file. The expression text is in that file. Exactly how you might go about extracting the expression information you want depends on what you intend to use it for.