<?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: Concatenate two fields in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Re-Concatenate-two-fields/m-p/1887511#M73135</link>
    <description>&lt;P&gt;To clear some things up.&lt;/P&gt;
&lt;P&gt;Concatenate means that you simply append your field or table. So by concatenating your table you just add new lines at the end. If you concatenate two fields with "&amp;amp;" you just attach the content of the fields.&lt;/P&gt;
&lt;P&gt;What you are may looking for is way to handle the both fields as if they were the same field?&lt;BR /&gt;Then the way to go in qlik is: give them the same name -&amp;gt; they are interpreted as the same field (as you already tried). Since it isn't allowed to give a name twice within a table you have to load this in 2 steps:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;table:
Load distinct
MenuId,
Explanation as Groups
; SELECT .... FROM XYZ;

concatenate(table)
Load distinct
MenuId,
Group as Groups
; SELECT ... FROM XYZ;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case you may will get two lines of data for each menuId.&lt;BR /&gt;&lt;BR /&gt;I wonder if you may want to achieve smething like this: Take the value of Explanation, if it is null then take vlaue of Group ?&lt;BR /&gt;Then you can load it whith a single load statement and just use the alt()-statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Load
  MenuId,
  alt(Explanation, Group) as Groups;
SELECT ... FROM XYZ;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Feb 2022 11:04:46 GMT</pubDate>
    <dc:creator>chris_djih</dc:creator>
    <dc:date>2022-02-01T11:04:46Z</dc:date>
    <item>
      <title>Re: Concatenate two fields</title>
      <link>https://community.qlik.com/t5/App-Development/Re-Concatenate-two-fields/m-p/1887364#M73130</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good days,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I extract data from SQL.&lt;/P&gt;
&lt;P&gt;In the Select section i have 2 fields called "Explanation" and "Group".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the LOAD part i would like to combine both fields as they have similar parts within them. I wrote LOAD part like this:&lt;/P&gt;
&lt;P&gt;LOAD Distinct&lt;/P&gt;
&lt;P&gt;Explanation&amp;amp; Group as Groups&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When i run this code in the front i create a listbox with the Field of "Groups" but it brings me double things under it.&lt;/P&gt;
&lt;P&gt;Such as : Explanation and Group contains a field called linkedin and it shows in the list box as LinkedinLinkedin.&lt;/P&gt;
&lt;P&gt;What can i do to prevent that double thing?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I wrote my code like this but it doesnt work:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;CONCATENATE&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Table:&lt;BR /&gt;Load Distinct&lt;BR /&gt;MenuId,&lt;BR /&gt;Explanation&amp;nbsp;as Groups,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Group as Groups&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;;&lt;BR /&gt;SELECT&lt;BR /&gt;MenuId,&lt;BR /&gt;Explanation,&lt;BR /&gt;Group&lt;BR /&gt;&lt;BR /&gt;FROM XYZ&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;
&lt;P&gt;Kind Regards.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 06:24:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Re-Concatenate-two-fields/m-p/1887364#M73130</guid>
      <dc:creator>Learnerr</dc:creator>
      <dc:date>2022-02-01T06:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate two fields</title>
      <link>https://community.qlik.com/t5/App-Development/Re-Concatenate-two-fields/m-p/1887511#M73135</link>
      <description>&lt;P&gt;To clear some things up.&lt;/P&gt;
&lt;P&gt;Concatenate means that you simply append your field or table. So by concatenating your table you just add new lines at the end. If you concatenate two fields with "&amp;amp;" you just attach the content of the fields.&lt;/P&gt;
&lt;P&gt;What you are may looking for is way to handle the both fields as if they were the same field?&lt;BR /&gt;Then the way to go in qlik is: give them the same name -&amp;gt; they are interpreted as the same field (as you already tried). Since it isn't allowed to give a name twice within a table you have to load this in 2 steps:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;table:
Load distinct
MenuId,
Explanation as Groups
; SELECT .... FROM XYZ;

concatenate(table)
Load distinct
MenuId,
Group as Groups
; SELECT ... FROM XYZ;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case you may will get two lines of data for each menuId.&lt;BR /&gt;&lt;BR /&gt;I wonder if you may want to achieve smething like this: Take the value of Explanation, if it is null then take vlaue of Group ?&lt;BR /&gt;Then you can load it whith a single load statement and just use the alt()-statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Load
  MenuId,
  alt(Explanation, Group) as Groups;
SELECT ... FROM XYZ;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 11:04:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Re-Concatenate-two-fields/m-p/1887511#M73135</guid>
      <dc:creator>chris_djih</dc:creator>
      <dc:date>2022-02-01T11:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate two fields</title>
      <link>https://community.qlik.com/t5/App-Development/Re-Concatenate-two-fields/m-p/1887919#M73166</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first code block that You shared worked and now i removed all the recurring fields in the front part. It increased my motivation. Thank you so much and have a nice day.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 06:02:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Re-Concatenate-two-fields/m-p/1887919#M73166</guid>
      <dc:creator>Learnerr</dc:creator>
      <dc:date>2022-02-02T06:02:45Z</dc:date>
    </item>
  </channel>
</rss>

