4 Replies Latest reply: May 9, 2012 5:09 AM by Sunil Chauhan

# What is different function of Dual and Mode?

What is function of Dual in Qlikview? Can someone help me to explain?

Thanks

• ###### Re: What is function of Dual?

Hi,

It is used to concatenate two fileds into on field basiscally and make single field comes up with two field.

syntax is dual(field1,field2) as newfield

Regards,

Anand

• ###### Re: What is function of Dual?

What is the different with function Mode? May be someone can give me the example of different dual and mode function. Thanks

• ###### Re: What is different function of Dual and Mode?

Hi,

Example of Dual

[String,Num

Mon,0

Tue,1

Wed,2

Thu,3

Fri,4

Sat,5

Sun,6

];

Example of Mode

Mode is a aggregation function

Month,

mode(feild) as CommanNumber

from SourceFile

Group by Month;

HTH

Regards,

Anand

• ###### What is different function of Dual and Mode?

dual function can keep two values at a time.

example

dual(a,b) it will hold two valuees i.e a and b values

a should be text and b should be integar

and

mod function

mod(x1 , x2)

Mathematical modula function. Both parameters must have integer values. x2 must be greater than 0. The result is the non-negative remainder of an integer division.

Examples:

mod( 7,2 ) returns 1

mod( 7.5,2 ) returns NULL

mod( 9,3 ) returns 0

mod( -4,3 ) returns 2

mod( 4,-3 ) returns NULL

mod( -4,-3 ) returns NULL

hope this helps