Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
veerendrakatika
Contributor III
Contributor III

Confusing with DUAL function

anybody could post on elaborating about DUAL function. I believe that it is some thing like Interpretation.if we have an example along with explanation please post it on this thread.

Thanks

Veerendra

1 Solution

Accepted Solutions
sasiparupudi1
Master III
Master III

It basically gives you an ability to have a meaningful display value.

For example if you have a flag in the data that has 1 or 0, the users might want to see a string value "Yes/No" so you could use DUAL to do this for you

In the below ex, PaidFlag will display string value in the UI and to get to the numeric value, use Num(PaidFlag)

Ex:

Test:

Load

Name,

Amount,

Dual(if(Paid=0,'No','Yes'),Paid) as PaidFlag;

Load * Inline

[

Name,Amount,Paid

Victor,1000,0

Kenny,300,1

Daren,200,0

];

hth

Sas

View solution in original post

2 Replies
hector_munoz
Specialist
Specialist

Hi Vereendra,

Look at this: How to use- Dual()

Regards,

H

sasiparupudi1
Master III
Master III

It basically gives you an ability to have a meaningful display value.

For example if you have a flag in the data that has 1 or 0, the users might want to see a string value "Yes/No" so you could use DUAL to do this for you

In the below ex, PaidFlag will display string value in the UI and to get to the numeric value, use Num(PaidFlag)

Ex:

Test:

Load

Name,

Amount,

Dual(if(Paid=0,'No','Yes'),Paid) as PaidFlag;

Load * Inline

[

Name,Amount,Paid

Victor,1000,0

Kenny,300,1

Daren,200,0

];

hth

Sas