Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

NavinReddy
Contributor 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
Partner
Partner

Re: Only Qualifier

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
Honored Contributor

Re: Only Qualifier

Hi Niranjan,

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

Regards,

Sokkorn

MVP & Luminary
MVP & Luminary

Re: Only Qualifier

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

Re: Only Qualifier

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!