Setting the default display format

The default document format for a numeric value (the text part of the dual value) is decided on by QlikView when the field is first loaded. This can be a problem if the incoming data is unclean, or you want to change the format as it is loaded.

The usual approach is to use one of the formatting functions, like Num or Date, to apply the format as it is being loaded. This can be troublesome if you are loading from QVD and want to retain the QVD optimization on loading—adding a Num or Date function would lose that optimized load.

There is another way. In this recipe, we can see that by loading the data in a temporary table first, we can force the format for the rest of the data.

Getting ready

Load the following script: ...

Get QlikView for Developers Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.