Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dual()

Hello community,

I have basic knowledge on dual function.But I want to know more about in detail.

How its helpful in real time?

Please help me out in this.

R'gs

Sattish

2 Replies
SergeyMak
Partner Ambassador
Partner Ambassador

Information form help


dual( s , x )

Forced association of an arbitrary string representation s with a given number representation x. In QlikView, when several data items read into one field have different string representations but the same valid number representation, they will all share the first string representation encountered. This function can be used in scripts and chart expressions.

In scripting, the dual function is typically used early in the script, before other data is read into the field concerned, in order to create that first string representation, which will be shown in list boxes etc.

Note!
If a dual value is too large to fit in a field object, it will be represented by ## and not truncated with ... like a string.

Example (scripting):

load dual ( string,numrep ) as DayOfWeek inline

[ string,numrep

Monday,0

Tuesday,1

Wednesday,2

Thursday,3

Friday,4

Saturday,5

Sunday,6 ];

load Date, weekday(Date) as DayOfWeek from afile.csv;

The script example will generate a field DayOfWeek with the weekdays written in clear text. QlikView will for all purposes regard the field as a numeric field.

Regards,
Sergey
SergeyMak
Partner Ambassador
Partner Ambassador

And additional info:

Dual & Exists – Useful Functions

Regards,

Sergey

Regards,
Sergey