Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
Hi Niranjan,
I never hear about "Only Qualifier". It should be Only() function. This one is very detail.
Regards,
Sokkorn
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.
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:
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.
only( Sales )
only( Price*Quantity )
only( total Salesman )
Hope this helps!