<?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: Merging columns then counting values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Merging-columns-then-counting-values/m-p/1759324#M719935</link>
    <description>&lt;P&gt;first you need to identify your key, normally i would say Item Content + a date.&amp;nbsp; from what i see you just need to see is a resource was ever a Pilot, Pilot2, or Pilot3.&amp;nbsp; what you were doing can work if you added Item Concent:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[Table2]:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Load ItemContent,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;[Ressource1] AS [Ressource]&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;resident Table1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Concatenate(Table2)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;load&amp;nbsp;ItemContent,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;[Ressource2] AS [Ressource] R&lt;/SPAN&gt;&lt;SPAN&gt;ESIDENT Table1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Concatenate(Table2)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Load&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;[Ressource3] AS [Ressource]&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;RESIDENT Table1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;this way you have the new table related to your original table in a 1 to many relationship.&lt;/P&gt;&lt;P&gt;there is another way to unpivot your table:&lt;BR /&gt;&lt;A href="https://community.qlik.com/t5/New-to-QlikView/Unpivot-A-Source-Crosstab-Table/m-p/684081" target="_blank"&gt;https://community.qlik.com/t5/New-to-QlikView/Unpivot-A-Source-Crosstab-Table/m-p/684081&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Nov 2020 13:21:24 GMT</pubDate>
    <dc:creator>edwin</dc:creator>
    <dc:date>2020-11-06T13:21:24Z</dc:date>
    <item>
      <title>Merging columns then counting values</title>
      <link>https://community.qlik.com/t5/QlikView/Merging-columns-then-counting-values/m-p/1758927#M719934</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello all,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I want to count how many time each resource are used per Item content. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Excel source  (2).png" style="width: 573px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/43614iB0731A29546450F7/image-dimensions/573x63?v=v2" width="573" height="63" role="button" title="Excel source  (2).png" alt="Excel source  (2).png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What I did first is merging three fields ressource1 , ressource2 &amp;amp; Ressource 3 into one unique field called "Ressource" in a new table as following:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;[Table1]:&lt;BR /&gt;LOAD&lt;BR /&gt;[Title],&lt;BR /&gt;[ID],&lt;BR /&gt;[Item Content],&lt;BR /&gt;[Start date],&lt;BR /&gt;[End date],&lt;BR /&gt;[Ressource1],&lt;BR /&gt;[Ressource2],&lt;BR /&gt;[Ressource3],&lt;BR /&gt;[Color],&lt;BR /&gt;[Group],&lt;BR /&gt;[Item Type]&lt;BR /&gt;FROM [lib://AttachedFiles/TEST TIMELINE QLICKSENSE.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is Table1);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;[Table2]:&lt;BR /&gt;Load&lt;BR /&gt;[Ressource1] AS [Ressource]&lt;BR /&gt;resident Table1;&lt;BR /&gt;Concatenate(Table2)&lt;BR /&gt;load&lt;BR /&gt;[Ressource2] AS [Ressource]&lt;BR /&gt;RESIDENT Table1;&lt;BR /&gt;Concatenate(Table2)&lt;BR /&gt;Load&lt;BR /&gt;[Ressource3] AS [Ressource]&lt;BR /&gt;RESIDENT Table1;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Then I compare the "Ressource" field to the "Item Content" field. &lt;/SPAN&gt;&lt;SPAN&gt;But at this step, each resource is counted at least once time per project and it's not what I expect as results.&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Comparison (2).png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/43615iDB2A5AE7246778AA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Comparison (2).png" alt="Comparison (2).png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What I want to see is : &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Resource , Item content &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;AB=0, Pilot &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;AB=1, Pilot2 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;AB=0, Pilot3 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;AB=0, New process &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ALPHA=1, Pilot &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ALPHA=0, Pilot2 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ALPHA=1, Pilot3 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ALPHA=0, New Process&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thx for your reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Merging-columns-then-counting-values/m-p/1758927#M719934</guid>
      <dc:creator>jstan</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Merging columns then counting values</title>
      <link>https://community.qlik.com/t5/QlikView/Merging-columns-then-counting-values/m-p/1759324#M719935</link>
      <description>&lt;P&gt;first you need to identify your key, normally i would say Item Content + a date.&amp;nbsp; from what i see you just need to see is a resource was ever a Pilot, Pilot2, or Pilot3.&amp;nbsp; what you were doing can work if you added Item Concent:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[Table2]:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Load ItemContent,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;[Ressource1] AS [Ressource]&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;resident Table1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Concatenate(Table2)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;load&amp;nbsp;ItemContent,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;[Ressource2] AS [Ressource] R&lt;/SPAN&gt;&lt;SPAN&gt;ESIDENT Table1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Concatenate(Table2)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Load&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;[Ressource3] AS [Ressource]&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;RESIDENT Table1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;this way you have the new table related to your original table in a 1 to many relationship.&lt;/P&gt;&lt;P&gt;there is another way to unpivot your table:&lt;BR /&gt;&lt;A href="https://community.qlik.com/t5/New-to-QlikView/Unpivot-A-Source-Crosstab-Table/m-p/684081" target="_blank"&gt;https://community.qlik.com/t5/New-to-QlikView/Unpivot-A-Source-Crosstab-Table/m-p/684081&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 13:21:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Merging-columns-then-counting-values/m-p/1759324#M719935</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-11-06T13:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: Merging columns then counting values</title>
      <link>https://community.qlik.com/t5/QlikView/Merging-columns-then-counting-values/m-p/1759326#M719936</link>
      <description>&lt;P&gt;to add on to this, in case the same resource was used as an itemContent multiple times, you may want to aggregate your table2:&lt;BR /&gt;&lt;BR /&gt;NewTable2: load itemContent, Resource, count(Resource) as Count resident table2 group by&amp;nbsp;itemContent, Resource;&lt;/P&gt;&lt;P&gt;drop table Table2;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 13:24:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Merging-columns-then-counting-values/m-p/1759326#M719936</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-11-06T13:24:08Z</dc:date>
    </item>
  </channel>
</rss>

