<?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: wide format transfers into long format in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/wide-format-transfers-into-long-format/m-p/2135168#M92259</link>
    <description>&lt;P&gt;Hi Wunderlich&lt;/P&gt;
&lt;P&gt;Thanks for your time looking into my question and appreciate your example code&lt;/P&gt;
&lt;P&gt;I am attaching my QVF and the excel file for the raw data. It looks my code is pretty much like your example code...&lt;/P&gt;
&lt;P&gt;but somehow I find a few discrepancies on the market share number. that brings me to think something wrong with the key to join two measurements.&lt;/P&gt;
&lt;P&gt;For example, if you check RecID 865 ( PRD DEMO ID is&amp;nbsp;DEMO003011), qlik shows market share % is 58%, but the raw data file is 36%&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="coloful_architect_0-1699319296062.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/119437i5F8DEFD06F1A7A49/image-size/medium?v=v2&amp;amp;px=400" role="button" title="coloful_architect_0-1699319296062.png" alt="coloful_architect_0-1699319296062.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="coloful_architect_1-1699320385979.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/119439i5C713227B7ED1855/image-size/medium?v=v2&amp;amp;px=400" role="button" title="coloful_architect_1-1699320385979.png" alt="coloful_architect_1-1699320385979.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;anything I miss? or it is due to the data per se?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please advise.&lt;/P&gt;
&lt;P&gt;thanks&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Nov 2023 01:27:14 GMT</pubDate>
    <dc:creator>coloful_architect</dc:creator>
    <dc:date>2023-11-07T01:27:14Z</dc:date>
    <item>
      <title>wide format transfers into long format</title>
      <link>https://community.qlik.com/t5/App-Development/wide-format-transfers-into-long-format/m-p/2134254#M92182</link>
      <description>&lt;P&gt;I have a table like this&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Product name, Product code, Company, Month 1 unit, Month 1 dollar, Month 2 unit, Month 2 dollar .....Month 12 unit, Month 12 dollar.&lt;/P&gt;
&lt;P&gt;I want to transform it into&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Product name, Product code, Company, Date , Dollar, Units&lt;/P&gt;
&lt;P&gt;Date would be month 1 to month 12&lt;/P&gt;
&lt;P&gt;So I tried to use cross table to make one for unit and one for dollar and then combine them together...&lt;/P&gt;
&lt;P&gt;but due to unaligned key issue, do not get the right numbers...&lt;/P&gt;
&lt;P&gt;wondering if we have a smarter way to achieve a format with long template.&lt;/P&gt;
&lt;P&gt;thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 21:47:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/wide-format-transfers-into-long-format/m-p/2134254#M92182</guid>
      <dc:creator>Coloful_Black</dc:creator>
      <dc:date>2023-11-02T21:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: wide format transfers into long format</title>
      <link>https://community.qlik.com/t5/App-Development/wide-format-transfers-into-long-format/m-p/2134278#M92183</link>
      <description>&lt;P&gt;Crosstable should work in this case. Assign a key to each row as you read it to ensure a unique key per row.&lt;/P&gt;
&lt;P&gt;CrossTable (Month, Units, 4) Load RecNo() as RecId, &lt;BR /&gt;&lt;SPAN&gt;Product name, Product code, Company, Month 1 Unit, Month 2 Unit, etc...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;CrossTable (Month, Units, 4) Load RecNo() as RecId, &lt;BR /&gt;&lt;SPAN&gt;Product name, Product code, Company, Month 1 dollar, Month 2 dollar, etc...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can join the two tables using RecId. But do the crosstable first to a temp table and then join from the temp table.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;-Rob&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 23:24:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/wide-format-transfers-into-long-format/m-p/2134278#M92183</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2023-11-02T23:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: wide format transfers into long format</title>
      <link>https://community.qlik.com/t5/App-Development/wide-format-transfers-into-long-format/m-p/2134286#M92184</link>
      <description>&lt;P&gt;that was my first try ...and I tried RecNo(), RowN0()...but all seems to have nonaligned key issue...and having recNo() into crosstable, it would generate non-unique id.....one row has multiple same RecId....&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 00:43:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/wide-format-transfers-into-long-format/m-p/2134286#M92184</guid>
      <dc:creator>Coloful_Black</dc:creator>
      <dc:date>2023-11-03T00:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: wide format transfers into long format</title>
      <link>https://community.qlik.com/t5/App-Development/wide-format-transfers-into-long-format/m-p/2134295#M92185</link>
      <description>&lt;P&gt;so I tried to create two additional temp file based on cross tab function to create rowID ( creating rowID when running corsstable generates multiple same rowID , which causes double counting when joins the tables)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;however, the nonaligned rowID issue still retains. I tried recno() and rowno() , both do not give me any luck.&lt;/P&gt;
&lt;P&gt;I create two tables one for units, one for dollar separately, their rowID do not a&lt;/P&gt;
&lt;P&gt;wondering how the system generates the index.&amp;nbsp; &amp;nbsp;would those dimension values 's difference change the sequence of system to load the data so that index would be changed as well?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 01:58:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/wide-format-transfers-into-long-format/m-p/2134295#M92185</guid>
      <dc:creator>Coloful_Black</dc:creator>
      <dc:date>2023-11-03T01:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: wide format transfers into long format</title>
      <link>https://community.qlik.com/t5/App-Development/wide-format-transfers-into-long-format/m-p/2134567#M92192</link>
      <description>&lt;P&gt;Here's a working example:&lt;/P&gt;
&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;DataTemp:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;LOAD&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; * &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Inline&lt;/SPAN&gt; [&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Product name, Product code, Company, Month 1 unit, Month 1 dollar, Month 2 unit, Month 2 dollar&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Shoes, A, Comp1, 100, 400, 200, 500&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Pants, B, Comp2, 50, 302, 60, 510&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;]&lt;SPAN class="s1"&gt;&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;Units:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;CrossTable&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; (&lt;/SPAN&gt;Date&lt;SPAN class="s1"&gt;, &lt;/SPAN&gt;Units&lt;SPAN class="s1"&gt;, 4) &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Load&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;RecNo&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;() &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;as&lt;/SPAN&gt; RecId&lt;SPAN class="s1"&gt;, &lt;/SPAN&gt;[Product name]&lt;SPAN class="s1"&gt;, &lt;/SPAN&gt;[Product code]&lt;SPAN class="s1"&gt;, &lt;/SPAN&gt;Company&lt;SPAN class="s1"&gt;, &lt;/SPAN&gt;[Month 1 unit] &lt;SPAN class="s2"&gt;as&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; 1, &lt;/SPAN&gt;[Month 2 unit] &lt;SPAN class="s2"&gt;as&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; 2&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Resident&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; DataTemp;&lt;BR /&gt;&lt;BR /&gt;Dollars:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;CrossTable&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; (&lt;/SPAN&gt;Date&lt;SPAN class="s1"&gt;, &lt;/SPAN&gt;Dollars&lt;SPAN class="s1"&gt;, 4) &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Load&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;RecNo&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;() &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;as&lt;/SPAN&gt; RecId&lt;SPAN class="s1"&gt;, &lt;/SPAN&gt;[Product name]&lt;SPAN class="s1"&gt;, &lt;/SPAN&gt;[Product code]&lt;SPAN class="s1"&gt;, &lt;/SPAN&gt;Company&lt;SPAN class="s1"&gt;, &lt;/SPAN&gt;[Month 1 dollar] &lt;SPAN class="s2"&gt;as&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; 1, &lt;/SPAN&gt;[Month 2 dollar] &lt;SPAN class="s2"&gt;as&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; 2&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Resident&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; DataTemp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Join&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; (Units) &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Load&lt;/SPAN&gt; RecId&lt;SPAN class="s1"&gt;, &lt;/SPAN&gt;Date&lt;SPAN class="s1"&gt;, &lt;/SPAN&gt;Dollars&lt;SPAN class="s1"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Resident&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; Dollars;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Drop&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;Table&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; DataTemp, Dollars; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;-Rob&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 16:49:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/wide-format-transfers-into-long-format/m-p/2134567#M92192</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2023-11-03T16:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: wide format transfers into long format</title>
      <link>https://community.qlik.com/t5/App-Development/wide-format-transfers-into-long-format/m-p/2135168#M92259</link>
      <description>&lt;P&gt;Hi Wunderlich&lt;/P&gt;
&lt;P&gt;Thanks for your time looking into my question and appreciate your example code&lt;/P&gt;
&lt;P&gt;I am attaching my QVF and the excel file for the raw data. It looks my code is pretty much like your example code...&lt;/P&gt;
&lt;P&gt;but somehow I find a few discrepancies on the market share number. that brings me to think something wrong with the key to join two measurements.&lt;/P&gt;
&lt;P&gt;For example, if you check RecID 865 ( PRD DEMO ID is&amp;nbsp;DEMO003011), qlik shows market share % is 58%, but the raw data file is 36%&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="coloful_architect_0-1699319296062.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/119437i5F8DEFD06F1A7A49/image-size/medium?v=v2&amp;amp;px=400" role="button" title="coloful_architect_0-1699319296062.png" alt="coloful_architect_0-1699319296062.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="coloful_architect_1-1699320385979.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/119439i5C713227B7ED1855/image-size/medium?v=v2&amp;amp;px=400" role="button" title="coloful_architect_1-1699320385979.png" alt="coloful_architect_1-1699320385979.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;anything I miss? or it is due to the data per se?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please advise.&lt;/P&gt;
&lt;P&gt;thanks&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 01:27:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/wide-format-transfers-into-long-format/m-p/2135168#M92259</guid>
      <dc:creator>coloful_architect</dc:creator>
      <dc:date>2023-11-07T01:27:14Z</dc:date>
    </item>
  </channel>
</rss>

