Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
shekhar_analyti
Specialist
Specialist

Please explain this expression

Hi All ,

Please explain this expression :

Only({1}(Match(Country,'USA','UK','BR','IN','AG')))

What is the significance of only to this  expression  ?

Regards

Shekar

1 Solution

Accepted Solutions
swuehl
MVP
MVP

The explicite use of the only function allows to add a set expression, which may help in ignoring user selections:

2017-03-15 09_46_21-QlikView x64 - [C__Users_s.wuehl_Downloads_Only_2.qvw_].png

User selected Georgia. See the difference?

View solution in original post

7 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Only() converts an ordinary function call returning a single value into an aggregation expression (example for use in chart expressions where Only() is often implied.)

Highly context-dependent. Where is it used?

shekhar_analyti
Specialist
Specialist
Author

Hi Peter

Thanks for reply .

It was used for custom sorting of a Multibox to ensure that on user selection position of field value does not change .. Now can you help me understand , how it works .

swuehl
MVP
MVP

I guess the main reason for usage is to allow the application of set analysis (which you can only use in combination with an aggregation function like Sum(), Count() .... or Only() ! )

The Only Function

shekhar_analyti
Specialist
Specialist
Author

I am attaching sample qvw .

Please explain only()  in that context .

posn changes.JPG

posn no change.JPG

beck_bakytbek
Master
Master

Hi Shekhar,

look at this: https://community.qlik.com/docs/DOC-8146

i hope that helps

beck

swuehl
MVP
MVP

The explicite use of the only function allows to add a set expression, which may help in ignoring user selections:

2017-03-15 09_46_21-QlikView x64 - [C__Users_s.wuehl_Downloads_Only_2.qvw_].png

User selected Georgia. See the difference?

shekhar_analyti
Specialist
Specialist
Author

I got it now ... Only() for Demystified to me ..

Thank You Stefan ..