<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Problem with concat function in an expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-concat-function-in-an-expression/m-p/707053#M254788</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have a winner!&amp;nbsp; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can't say that I understand &lt;SPAN style="text-decoration: underline;"&gt;how&lt;/SPAN&gt; it works, but I'll study it.&amp;nbsp; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks very much for your help, Jonathan!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Sep 2014 17:52:56 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-09-26T17:52:56Z</dc:date>
    <item>
      <title>Problem with concat function in an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-concat-function-in-an-expression/m-p/707044#M254779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a straight table with 3 dimensions:&amp;nbsp; TransactionID, Account, Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to concatentate the following four fields, separated by commas, but omitting the comma if the field is NULL.&lt;/P&gt;&lt;P&gt;InsID2&lt;/P&gt;&lt;P&gt;InsID3&lt;/P&gt;&lt;P&gt;InsID4&lt;/P&gt;&lt;P&gt;InsID5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using concat( InsID2&amp;amp;''&amp;amp;InsID3&amp;amp;''&amp;amp;InsID4&amp;amp;''&amp;amp;InsID5, ', ' ) should work, but I get inconsistent results.&lt;/P&gt;&lt;P&gt;For example, where InsID2 = OTHER, and all others are NULL, I see the following results:&lt;/P&gt;&lt;P&gt;OTHER&lt;/P&gt;&lt;P&gt;OTHER, OTHER&lt;/P&gt;&lt;P&gt;OTHER, OTHER, OTHER&lt;/P&gt;&lt;P&gt;OTHER, OTHER, OTHER, OTHER&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes, where InsID2 = WC and InsID3 = BC, it returns WCBC, omitting the comma.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, where all 4 fields are NULL, the commas still appear sometimes (but not always). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I missing something in the syntax of this expression?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 15:41:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-concat-function-in-an-expression/m-p/707044#M254779</guid>
      <dc:creator />
      <dc:date>2014-09-26T15:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with concat function in an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-concat-function-in-an-expression/m-p/707045#M254780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if you want concat().&amp;nbsp; How about this ?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;InsID2 &amp;amp; if( isnull(InsID2)&amp;lt;&amp;gt;-1,',') &amp;amp; InsID3 &amp;amp; if( isnull(InsID3)&amp;lt;&amp;gt;-1,',') &amp;amp; InsID4 &amp;amp; if( isnull(InsID4)&amp;lt;&amp;gt;-1,',') &amp;amp; InsID5 &amp;amp; if( isnull(InsID5)&amp;lt;&amp;gt;-1,',')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will be a different result every row in the chart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 15:45:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-concat-function-in-an-expression/m-p/707045#M254780</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-09-26T15:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with concat function in an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-concat-function-in-an-expression/m-p/707046#M254781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please post sample app.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 16:10:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-concat-function-in-an-expression/m-p/707046#M254781</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-09-26T16:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with concat function in an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-concat-function-in-an-expression/m-p/707047#M254782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Jonathan.&amp;nbsp; That solved the errors.&amp;nbsp; The only remaining issue is how to eliminate the comma that appears at the end of each created string.&amp;nbsp; Any thoughts?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 16:51:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-concat-function-in-an-expression/m-p/707047#M254782</guid>
      <dc:creator />
      <dc:date>2014-09-26T16:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with concat function in an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-concat-function-in-an-expression/m-p/707048#M254783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ha !&amp;nbsp; simple (my mistake)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;InsID2 &amp;amp; if( isnull(InsID2)&amp;lt;&amp;gt;-1,',') &amp;amp; InsID3 &amp;amp; if( isnull(InsID3)&amp;lt;&amp;gt;-1,',') &amp;amp; InsID4 &amp;amp; if( isnull(InsID4)&amp;lt;&amp;gt;-1,',') &amp;amp; InsID5 &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 16:53:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-concat-function-in-an-expression/m-p/707048#M254783</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-09-26T16:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with concat function in an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-concat-function-in-an-expression/m-p/707049#M254784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Forgive my miscommunication.&amp;nbsp; There's a comma at the end of every line:&lt;/P&gt;&lt;P&gt;OTHER,&lt;/P&gt;&lt;P&gt;OTHER,BC,&lt;/P&gt;&lt;P&gt;OTHER,BC,AUTO,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any way to supress that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 16:59:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-concat-function-in-an-expression/m-p/707049#M254784</guid>
      <dc:creator />
      <dc:date>2014-09-26T16:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with concat function in an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-concat-function-in-an-expression/m-p/707050#M254785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The solution to this issue would involve too many IFs so i different approach may work better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;nbsp; replace( trim(InsID2&amp;amp; ' ' &amp;amp; InsID3&amp;amp;' ' &amp;amp; InsID4&amp;amp;' ' &amp;amp; InsId5),' ',',')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it should work great, except if the InsID values could have spaces within the value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 17:23:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-concat-function-in-an-expression/m-p/707050#M254785</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-09-26T17:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with concat function in an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-concat-function-in-an-expression/m-p/707051#M254786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It does work!&amp;nbsp; But, as you said, there are sometimes spaces in the field value.&amp;nbsp; I know how to take care of this in Excel, but can't quite get it right in Qlikview.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 17:27:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-concat-function-in-an-expression/m-p/707051#M254786</guid>
      <dc:creator />
      <dc:date>2014-09-26T17:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with concat function in an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-concat-function-in-an-expression/m-p/707052#M254787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hmm... yes i was afraid of that. There could be a quick tweak , but only if you know of a character that would NEVER be in the VALUE.&amp;nbsp; Here i picked the '|' character. I replace spaces with |'s in each value and then at the end put the spaces back in.&amp;nbsp; Would you have |'s in your values&amp;nbsp; ?:)&amp;nbsp;&amp;nbsp; I can't say i'm completely satisfied with it . We should be able to get to a 100% guarantee. Anyways let me know what your comfortable with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;replace( replace( trim( replace(InsID2,' ','|')&amp;amp; ' ' &amp;amp; replace(InsID3,' ','|')&amp;amp;' ' &amp;amp; replace(InsID4,' ' ,'|') &amp;amp;' ' &amp;amp; replace(InsID5,' ','|')),' ',','),'|',' ')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 17:41:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-concat-function-in-an-expression/m-p/707052#M254787</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-09-26T17:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with concat function in an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-concat-function-in-an-expression/m-p/707053#M254788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have a winner!&amp;nbsp; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can't say that I understand &lt;SPAN style="text-decoration: underline;"&gt;how&lt;/SPAN&gt; it works, but I'll study it.&amp;nbsp; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks very much for your help, Jonathan!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 17:52:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-concat-function-in-an-expression/m-p/707053#M254788</guid>
      <dc:creator />
      <dc:date>2014-09-26T17:52:56Z</dc:date>
    </item>
  </channel>
</rss>

