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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
qv_testing
Specialist II
Specialist II

Mode and Only

Hi All

Difference between Mode and Only

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..

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

They are quite two different functions. Mode() returns the most common value in the group. Only() returns a value if there is only one value in the group, otherwise it returns null.

-Rob

qv_testing
Specialist II
Specialist II
Author

Thanks Rob...

Its very Helpful answer.................