Qlik Community

Ask a Question

Knowledge Base

Search or browse our knowledge base to find answers to your questions ranging from account questions to troubleshooting error messages. The content is curated and updated by our global Support team

Live chat with experts, bring your API Integration questions. June 15th, 10 AM ET. REGISTER TODAY

How to convert a dual value to text


How to convert a dual value to text

All values in QlikView are dual values. All calculation and operation is done on the dual value's underlying numerical value, since this processing of numerical values is more efficient than text values. 

More details on what a dual value is can be found in the related article How are data types stored in QlikView?

Converting dual values to text can be relevant in some cases, for example when comparing decimal values or in order to keep loaded numerical values in the same format as in the source system.

Comparison of decimal or timestamp values do not work
How is data stored in QlikView?

The only way to convert a dual value or a text string to a pure text value in QlikView is to use the Text() function.

The Text() function returns a dual value where the underlying numerical value is a NULL value. Practically this means that the output for Text() is a dual value without a numerical representation, which there fore can not be used in calculations or numerical comparison. 

Other string functions like for example Right(), LTrim() or Subfield() returns a text string, which will be interpreted by QlikView and converted to a dual value. If the text string can be interpreted as a numerical value, the dual value will get an underlying numerical value.

The function output format can be seen in the function definition in the expression or script editor, by placing the input cursor to the right of the function bracket as seen in the images below. QlikView will interpret and generate dual value for non dual output values. Subfield() for example returns str (text string) data, which will be interpreted into a dual data value. Text() returns a dual value and will not be interpreted further. 

dual text expression.png

subfield 01.png           

Labels (1)
Version history
Revision #:
3 of 3
Last update:
‎2021-01-18 07:36 AM
Updated by: