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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Nagaraju_KCS
Specialist III
Specialist III

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

Nagaraju_KCS
Specialist III
Specialist III
Author

Thanks Rob...

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