Skip to main content
Announcements
Marching toward a simplified navigation! READ ON
cancel
Showing results for 
Search instead for 
Did you mean: 
NavinReddy
Creator II
Creator II

Only Qualifier

Hi All,

Yesterday one interviewer asked this Question

What is Only Qualifier and use of this

Could some one help me to know

Thanks In Advance

Niranjan

4 Replies
nilesh_gangurde
Partner - Specialist
Partner - Specialist

only(expression )

If expression over a number of records, as defined by a group by clause, contains only one numeric value, that value is returned. Else, NULL is returned.

-Nilesh

Sokkorn
Master
Master

Hi Niranjan,

I never hear about "Only Qualifier". It should be Only() function. This one is very detail.

Regards,

Sokkorn

jagan
Luminary Alumni
Luminary Alumni

Hi,

Only() will give you the value when a field has only one possible value in a Field.  For example

Year, HighestSoldProduct

2012, TV

2013, Laptop

If you select TV and use Only(Year)-- it will return 2012, if you do not select any value then it will return Null, since there are more that one possible value for Year.

Hope this helps you.

Regards,

Jagan.

Not applicable

Hi,

Only() is a chart aggregation function. It returns one single value for an expression or field if the expression or field contains a single value after being calculated over a dimension. If te field/dimension contains more than one single value then Null is returned.

Below you can get from Qlikview Help:

only( [{set_expression}][ distinct ] [ total [<fld {, fld}>]] expression)

If expression or field iterated over the chart dimension(s) contain one single value, that value is returned, else NULL is returned. Only can return numeric values as well as text values.

Examples:

only( Sales )

only( Price*Quantity )

only( total Salesman )

Hope this helps!