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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Only() function Question

I'm having trouble with the return type of the Only() function. I have the expression:

if(Only(RawDescription) = Null(), 'Multiple', RawDescription)

The dimension I'm using a product code, so the data set from which Only() is choosing is significantly cut down relative to the entire data set. It seems pretty straight forward to me - if Only() finds multiple RawDescriptions for the same product code, it should return Null() (I think?). In that case - output the string 'Multiple'. Otherwise, simply output the sole RawDescription that it found.

When I apply this expression, the product codes with multiple descriptions still return '-'.

Any ideas?

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try if(isnull(only(RawDescription),'Multiple',RawDescription)


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try if(isnull(only(RawDescription),'Multiple',RawDescription)


talk is cheap, supply exceeds demand
Not applicable
Author

Perfect - thanks.

-Paul