Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Gowtham
New Contributor II

Qlik sense Only Function

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

2 Solutions

Accepted Solutions
MVP
MVP

Re: Qlik sense Only Function

As already suggested by Asinha, try like:

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

asinha1991
Contributor III

Re: Qlik sense Only Function

 try this

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

6 Replies
asinha1991
Contributor III

Re: Qlik sense Only Function

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
New Contributor II

Re: Qlik sense Only Function

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

MVP
MVP

Re: Qlik sense Only Function

As already suggested by Asinha, try like:

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

asinha1991
Contributor III

Re: Qlik sense Only Function

 try this

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

Gowtham
New Contributor II

Re: Qlik sense Only Function

Thank you,

Its working as I expected

Gowtham
New Contributor II

Re: Qlik sense Only Function

Thank you Ashinha,

It's working now