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:
Data: Load * Inline [ Date, Value 2013-01-01, 1234.56 2013-01-14, 3245 2013-03-12, 2389.6 ]; Store Data into Data.qvd; Drop Table Data; Data: Load * From Data.qvd (QVD);
How to do it...
These steps show you how to set a default display...