<?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 Concat Two Fields in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Concat-Two-Fields/m-p/245571#M1195022</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to concatenate two fields in my load statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;EM&gt;BIN:&lt;/EM&gt;&lt;/P&gt;&lt;P class="p2"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Bin&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Last Four],&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; concat&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;( &lt;/SPAN&gt;Bin&lt;SPAN class="s1"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;'*****'&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;&amp;amp;&lt;/SPAN&gt;[Last Four]&lt;SPAN class="s1"&gt;) &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;as&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;Card&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;Number&lt;/P&gt;&lt;P class="p2"&gt;&lt;/P&gt;&lt;P class="p2"&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="p3"&gt;[Concat Test.xlsx]&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;ooxml&lt;SPAN class="s1"&gt;, &lt;/SPAN&gt;embedded&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;labels&lt;SPAN class="s1"&gt;, &lt;/SPAN&gt;table&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;is&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;Sheet1&lt;SPAN class="s1"&gt;)&lt;/SPAN&gt;; &lt;/P&gt;&lt;P class="p3"&gt;&lt;/P&gt;&lt;P class="p3"&gt;My goal's to create a field&amp;nbsp; 'Card Number' by combining 'Bin' and 'Last Four', however, I keep getting sytax errors when I try and load it. I've read a few posts on this and can't see the issue with my script. Any suggestions would be more than welcome.&lt;/P&gt;&lt;P class="p3"&gt;&lt;/P&gt;&lt;P class="p3"&gt;Thanks in advance for the help.&lt;/P&gt;&lt;P class="p3"&gt;&lt;/P&gt;&lt;P class="p3"&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Jun 2011 13:17:13 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-30T13:17:13Z</dc:date>
    <item>
      <title>Concat Two Fields</title>
      <link>https://community.qlik.com/t5/QlikView/Concat-Two-Fields/m-p/245571#M1195022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to concatenate two fields in my load statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;EM&gt;BIN:&lt;/EM&gt;&lt;/P&gt;&lt;P class="p2"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Bin&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Last Four],&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; concat&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;( &lt;/SPAN&gt;Bin&lt;SPAN class="s1"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;'*****'&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;&amp;amp;&lt;/SPAN&gt;[Last Four]&lt;SPAN class="s1"&gt;) &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;as&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;Card&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;Number&lt;/P&gt;&lt;P class="p2"&gt;&lt;/P&gt;&lt;P class="p2"&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="p3"&gt;[Concat Test.xlsx]&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;ooxml&lt;SPAN class="s1"&gt;, &lt;/SPAN&gt;embedded&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;labels&lt;SPAN class="s1"&gt;, &lt;/SPAN&gt;table&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;is&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;Sheet1&lt;SPAN class="s1"&gt;)&lt;/SPAN&gt;; &lt;/P&gt;&lt;P class="p3"&gt;&lt;/P&gt;&lt;P class="p3"&gt;My goal's to create a field&amp;nbsp; 'Card Number' by combining 'Bin' and 'Last Four', however, I keep getting sytax errors when I try and load it. I've read a few posts on this and can't see the issue with my script. Any suggestions would be more than welcome.&lt;/P&gt;&lt;P class="p3"&gt;&lt;/P&gt;&lt;P class="p3"&gt;Thanks in advance for the help.&lt;/P&gt;&lt;P class="p3"&gt;&lt;/P&gt;&lt;P class="p3"&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2011 13:17:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concat-Two-Fields/m-p/245571#M1195022</guid>
      <dc:creator />
      <dc:date>2011-06-30T13:17:13Z</dc:date>
    </item>
    <item>
      <title>Concat Two Fields</title>
      <link>https://community.qlik.com/t5/QlikView/Concat-Two-Fields/m-p/245572#M1195023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't need to use the concat in this case:&lt;/P&gt;&lt;P&gt;This should work&lt;/P&gt;&lt;P&gt;&amp;nbsp; Bin&amp;amp;'*****'&amp;amp;[Last Four] as Card Number&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2011 13:19:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concat-Two-Fields/m-p/245572#M1195023</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2011-06-30T13:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: Concat Two Fields</title>
      <link>https://community.qlik.com/t5/QlikView/Concat-Two-Fields/m-p/245573#M1195024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mattsies,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concat is defined as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;concat ( &lt;SPAN style="font-style: italic;"&gt;[ distinct ] expression, [delimiter [, sort-weight]]&lt;/SPAN&gt; )&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;returns the aggregated string concatenation of all values of &lt;SPAN style="font-style: italic;"&gt;expression&lt;/SPAN&gt; iterated over a number of records as defined by a &lt;SPAN style="font-weight: bold;"&gt;group by&lt;/SPAN&gt; clause. Each value may be separated by the string found in &lt;SPAN style="font-style: italic;"&gt;delimiter&lt;/SPAN&gt;. The order of concatenation may be determined by &lt;SPAN style="font-style: italic;"&gt;sort-weight&lt;/SPAN&gt;. &lt;SPAN style="font-style: italic;"&gt;Sort-weight&lt;/SPAN&gt; should return a numeric value where the lowest value will render the item to be sorted first. If the word &lt;SPAN style="font-weight: bold;"&gt;distinct&lt;/SPAN&gt; occurs before the &lt;SPAN style="font-style: italic;"&gt;expression&lt;/SPAN&gt;, all duplicates will be disregarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I think the syntax you used will not return a list of values to iterate over, that's why it causes an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concat is used to e.g. get a comma separated string of values of a dimension like:&lt;/P&gt;&lt;P&gt;concat (DIMENSION, ',')&lt;/P&gt;&lt;P&gt;For example in a Text box or chart expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2011 13:28:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concat-Two-Fields/m-p/245573#M1195024</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-06-30T13:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Concat Two Fields</title>
      <link>https://community.qlik.com/t5/QlikView/Concat-Two-Fields/m-p/245574#M1195025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Erich.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I edit the script according to your suggestion, I get the same error. Would you mind showing me how you'd do it with the attahced excel as an example?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Really appreciate the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2011 14:24:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concat-Two-Fields/m-p/245574#M1195025</guid>
      <dc:creator />
      <dc:date>2011-06-30T14:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: Concat Two Fields</title>
      <link>https://community.qlik.com/t5/QlikView/Concat-Two-Fields/m-p/245575#M1195026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try and get it to work using Erich's syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2011 14:25:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concat-Two-Fields/m-p/245575#M1195026</guid>
      <dc:creator />
      <dc:date>2011-06-30T14:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: Concat Two Fields</title>
      <link>https://community.qlik.com/t5/QlikView/Concat-Two-Fields/m-p/245576#M1195027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I used the following script and it worked for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;LOAD *, Bin &amp;amp; '*****' &amp;amp; Num([Last Four],'0000') as Result;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;LOAD Bin, [Last Four]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;FROM "Concat Test.xlsx" (ooxml, embedded labels, table is Sheet1);&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2011 14:37:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concat-Two-Fields/m-p/245576#M1195027</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2011-06-30T14:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: Concat Two Fields</title>
      <link>https://community.qlik.com/t5/QlikView/Concat-Two-Fields/m-p/245577#M1195028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls. add brackets [] around [Card Number]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2011 14:37:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concat-Two-Fields/m-p/245577#M1195028</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-06-30T14:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Concat Two Fields</title>
      <link>https://community.qlik.com/t5/QlikView/Concat-Two-Fields/m-p/245578#M1195029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The brackets were critical! Thanks again for the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2011 14:40:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concat-Two-Fields/m-p/245578#M1195029</guid>
      <dc:creator />
      <dc:date>2011-06-30T14:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Concat Two Fields</title>
      <link>https://community.qlik.com/t5/QlikView/Concat-Two-Fields/m-p/245579#M1195030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very good this solution. Solved a problem using the.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Stive&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Sep 2013 18:10:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concat-Two-Fields/m-p/245579#M1195030</guid>
      <dc:creator />
      <dc:date>2013-09-12T18:10:51Z</dc:date>
    </item>
  </channel>
</rss>

