Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE

How to convert a dual value to text

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
ToniKautto
Employee
Employee

How to convert a dual value to text

Last Update:

Jan 18, 2021 7:36:18 AM

Updated By:

Sonja_Bauernfeind

Created date:

Jun 4, 2014 5:16:07 PM

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)
Contributors
Version history
Last update:
‎2021-01-18 07:36 AM
Updated by: