Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Gowtham
Contributor III
Contributor III

Qlik sense Only Function

How to use Only() function to return multiple values with comma separated? 

2 Solutions

Accepted Solutions
tresesco
MVP
MVP

As already suggested by Asinha, try like:

Concat( Distinct {<Medication= , Type={'$(=$(vType))'}, HospiceCharge={"<$(=$(vCharge))"} >} Medication , ',' )

View solution in original post

asinha1991
Creator III
Creator III

 try this

concat( {<Medication= , Type={'$(=$(vType))'}, HospiceCharge={"<$(=$(vCharge))"} >} Medication),',')

View solution in original post

6 Replies
asinha1991
Creator III
Creator III

if you want comma separated value use concat...

concat(Fieldname,',')

only is used when we have just one output, concat combines multiple output in one cell

Gowtham
Contributor III
Contributor III
Author

Hi,

 

This is my expression

Only( {<Medication= , Type={'$(=$(vType))'}, HospiceCharge={"<$(=$(vCharge))"} >} Medication)

I want to show multiple medication in the KPI or text and I know only() return null when there is multiple values

Is there any alternative for Only() to show multiple values?

Thank you

tresesco
MVP
MVP

As already suggested by Asinha, try like:

Concat( Distinct {<Medication= , Type={'$(=$(vType))'}, HospiceCharge={"<$(=$(vCharge))"} >} Medication , ',' )

asinha1991
Creator III
Creator III

 try this

concat( {<Medication= , Type={'$(=$(vType))'}, HospiceCharge={"<$(=$(vCharge))"} >} Medication),',')

Gowtham
Contributor III
Contributor III
Author

Thank you,

Its working as I expected

Gowtham
Contributor III
Contributor III
Author

Thank you Ashinha,

It's working now