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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Only function in Qlikview

What is the meaning of below code?
=only({1}[Monthname])

Please advise.

Thanks in advance.

1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi Arjun,

=only({1}[Monthname])


{1} will ignore all the fields selections


Only() - will return the possible value of a given dimension, this will return if you have multiple possible values, so you should you this with bit more care, if you have multiple values then you can use


=Concat(DimnensionName, ',')


Or if you any one possible value you can Min(), Max() for numbers and MinString() and MaxString() for string dimensions.


Hope this helps you.


Regards,

Jagan.

View solution in original post

6 Replies
Anonymous
Not applicable
Author

The {1} in it means to to ignore all selections.

And the only will return the value of Monthname only of if it only has a single value in all it rows, otherwise it will return null.

SunilChauhan
Champion II
Champion II

it will take only monthname i.e as it is in field

and{1} -> ignores all selections

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.

Example:

Load Month, only(Price) as OnlyPriceSoldFor from abc.csv group by Month;

Sunil Chauhan
MarcoWedel

Anonymous
Not applicable
Author

Hey,

Check these..

Only() function in qlikview - what is the use?

Use of ONLY Function

Apart from above..Only function can be also used for serving purpose showed in below thread.

Re: Update textbox with selected value description

Regards,

Chinna

jagan
Partner - Champion III
Partner - Champion III

Hi Arjun,

=only({1}[Monthname])


{1} will ignore all the fields selections


Only() - will return the possible value of a given dimension, this will return if you have multiple possible values, so you should you this with bit more care, if you have multiple values then you can use


=Concat(DimnensionName, ',')


Or if you any one possible value you can Min(), Max() for numbers and MinString() and MaxString() for string dimensions.


Hope this helps you.


Regards,

Jagan.

Not applicable
Author

Thank you All.