Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Difference between column and only(column)


Hi,

Can anyone let me know what is the difference between

Columnname and Only(Columnname) when used in expression

Thanks.

11 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Both are same.

In only() you can use set analysis or if condition to restrict some rows not to display.

tresesco
MVP
MVP

If you write in expression =Columnname, qv takes as =Only(Columnname) internally, if you explicitly write that, qv doesn't have to treat it differently internally, otherwise both are same i believe.

When you explicitly write with Only(), you have the advantage of using aggregation function.

Not applicable
Author

Thanks can you please post an example expression with only() by using set analysis.

MayilVahanan

HI

PFA

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
CELAMBARASAN
Partner - Champion
Partner - Champion

Sure.

Not applicable
Author

Thanks and in the same manner if I have a column with NULL values and data.

In that case f I need to get only data values skipping NULL values means is it possible with only()?

MayilVahanan

HI

Yes

= Only({<Product = {'*'}>} Sales)

In this, its skips null value

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
CELAMBARASAN
Partner - Champion
Partner - Champion

Yes. You could use

Only({<FieldName={'*'}>} FieldName) - it excludes null

Not applicable
Author

Thanks and is it possible to use the same in dimension?