Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Abnout only and mode function

Hi ALl,

May I know what is the difference between only and mode function?

Can you give me an example?

Thanks.

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Create a new qlikview document and put this in the load script:

T1:

load * Inline [

ID,    Age

123,    12

123,    28

145,    30

145,    30

165,    15

165,    17

165,    15

165,    15

165,    12

165,    18

];

T2:

load ID, mode(Age) as AgeMode, only(Age) as AgeOnly

Resident T1 Group by ID;

Save the document and click on Reload. Create two table boxes for T1 and T2. Compare the values in the two tables. You'll see the difference in T2 between what Only and Mode do.


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Create a new qlikview document and put this in the load script:

T1:

load * Inline [

ID,    Age

123,    12

123,    28

145,    30

145,    30

165,    15

165,    17

165,    15

165,    15

165,    12

165,    18

];

T2:

load ID, mode(Age) as AgeMode, only(Age) as AgeOnly

Resident T1 Group by ID;

Save the document and click on Reload. Create two table boxes for T1 and T2. Compare the values in the two tables. You'll see the difference in T2 between what Only and Mode do.


talk is cheap, supply exceeds demand
qv_testing
Specialist II
Specialist II

Hi Gysbert

T1:

load * Inline [

ID,    Age

123,    12

123,    28

145,    30

145,    30

165,    15

165,    17

165,    15

165,    15

165,    12

165,    18

];

T2:

load ID, mode(Age) as AgeMode, only(Age) as AgeOnly

Resident T1 Group by ID;

T2 table  Returns

ID, AgeMode, AgeOnly

123,-,-

145,30,30

165,15,-

but i didn't understand..

please explain it..