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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
vijetas42
Specialist
Specialist

Concatenating String

I have two output of project code which are string so, how can I concatenate them and make a action in select field of text box

expression is,

count(DISTINCT {<[Code]={"=sum($(vSale))/1000000 >0"},[Phase]-={'Cancelled','Complete'},

[RAG]={'G'}>}[Code])

+

count(DISTINCT {<[Code]={"=sum($(vSale))/1000000 >0"},[Display_Phase]={'Open'},

[RAG]={'G'}>}[Code])

I have tried to write action in text box as,

'('&concat(DISTINCT {<[Code]={"=sum($(vSale))/1000000 >0"},[Phase]-={'Cancelled','Complete'},

[RAG]={'G'}>}[Code],'|')&')'

&

'('&concat(DISTINCT {<[Code]={"=sum($(vSale))/1000000 >0"},[Display_Phase]={'Open'},

[RAG]={'G'}>}

,'|')&')' 

but didn't work.

Please suggest!

TIA

3 Replies
sunny_talwar

May be this

='(' & Concat(DISTINCT {<[Code] = {"=Sum($(vSale))/1000000 >0"}, [Phase] -= {'Cancelled','Complete'},

[RAG] = {'G'}>+<[Code] = {"=Sum($(vSale))/1000000 >0"}, [Display_Phase] = {'Open'},

[RAG] = {'G'}>} [Code],'|') & ')'

or may be this

='(' & Concat(DISTINCT {<[Code] = {"=Sum($(vSale)) > 0"}, [Phase] -= {'Cancelled','Complete'},

[RAG] = {'G'}>+<[Code] = {"=Sum($(vSale)) > 0"}, [Display_Phase] = {'Open'},

[RAG] = {'G'}>}

,'|') & ')'

tresesco
MVP
MVP

May be this:

'('&

concat(DISTINCT {<[Code]={"=sum($(vSale))/1000000 >0"},[Phase]-={'Cancelled','Complete'},

[RAG]={'G'}>}[Code],'|')

& '|' &

concat(DISTINCT {<[Code]={"=sum($(vSale))/1000000 >0"},[Display_Phase]={'Open'},

[RAG]={'G'}>}

,'|')

&')'

Note, few corrections in parenthesis and highlighted section.

jonathandienst
Partner - Champion III
Partner - Champion III

Not sure how vSales is defined  -  as liong it is not supposed to work row by row - you could try

'(' & Concat(DISTINCT {<[Code] = {"=sum($(vSale))/1000000 >0"}, [Phase] -= {'Cancelled','Complete'}, [RAG]={'G'}>} Code,'|')

& '|' &

& Concat(DISTINCT {<[Code] = {"=sum($(vSale))/1000000 >0"}, [Display_Phase] = {'Open'}, [RAG]={'G'}>} Code,'|') & ')'

Or perhaps a single expression rather than the compound one above:

'(' & Concat(DISTINCT {<[Code] = {"=sum($(vSale))/1000000 >0"}, [RAG]={'G'}> * (<[Phase] -= {'Cancelled','Complete'}> + <[Display_Phase] = {'Open'}>)} Code,'|') & ')'

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein