<?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: Correct way of mapping in a table with aggregate functions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Correct-way-of-mapping-in-a-table-with-aggregate-functions/m-p/1338659#M823593</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah it is just a sample. In production it wouldn't be filtered by a single week.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Jul 2017 20:28:34 GMT</pubDate>
    <dc:creator>julioarriaga</dc:creator>
    <dc:date>2017-07-19T20:28:34Z</dc:date>
    <item>
      <title>Correct way of mapping in a table with aggregate functions</title>
      <link>https://community.qlik.com/t5/QlikView/Correct-way-of-mapping-in-a-table-with-aggregate-functions/m-p/1338653#M823587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the basic question: I wrote the code (Test1) from a Binary and it worked fine. In Test2 I added a Sum(Total_Sales) grouped by Week and Fiscal_Year but it showed an error (Error image), saying that the field Year is not found. &lt;STRONG&gt;What is the correct way of doing a mapping in a table that has aggregate functions?&lt;/STRONG&gt; Because I suspect that is causing the problem.&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="170790" alt="Capture1.PNG" class="image-4 jive-image" src="https://community.qlik.com/legacyfs/online/170790_Capture1.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Test2:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="170791" alt="Capture2.PNG" class="image-5 jive-image" src="https://community.qlik.com/legacyfs/online/170791_Capture2.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="170792" alt="Capture3.PNG" class="jive-image image-6" src="https://community.qlik.com/legacyfs/online/170792_Capture3.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Correct-way-of-mapping-in-a-table-with-aggregate-functions/m-p/1338653#M823587</guid>
      <dc:creator>julioarriaga</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Correct way of mapping in a table with aggregate functions</title>
      <link>https://community.qlik.com/t5/QlikView/Correct-way-of-mapping-in-a-table-with-aggregate-functions/m-p/1338654#M823588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD Week, Year, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(Total_Sales) As Sales&lt;/P&gt;&lt;P&gt;Group by Week, Year;&lt;/P&gt;&lt;P&gt;LOAD Week,&lt;/P&gt;&lt;P&gt;ApplyMap('map1', Week) AS Year&lt;/P&gt;&lt;P&gt;Resident Fact&lt;/P&gt;&lt;P&gt;WHERE Week = '201701';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Store Sales into test.txt(txt); &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 18:43:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Correct-way-of-mapping-in-a-table-with-aggregate-functions/m-p/1338654#M823588</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2017-07-19T18:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: Correct way of mapping in a table with aggregate functions</title>
      <link>https://community.qlik.com/t5/QlikView/Correct-way-of-mapping-in-a-table-with-aggregate-functions/m-p/1338655#M823589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Julio,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should remove the Year field from the Group By clause.&amp;nbsp; Year does not yet exist as you are creating it with the Week field using your ApplyMap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck&lt;/P&gt;&lt;P&gt;Oscar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 18:50:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Correct-way-of-mapping-in-a-table-with-aggregate-functions/m-p/1338655#M823589</guid>
      <dc:creator>oscar_ortiz</dc:creator>
      <dc:date>2017-07-19T18:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Correct way of mapping in a table with aggregate functions</title>
      <link>https://community.qlik.com/t5/QlikView/Correct-way-of-mapping-in-a-table-with-aggregate-functions/m-p/1338656#M823590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try This&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD Week,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ApplyMap('map1', Week) AS Year,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum(Total_Sales) As Sales&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Resident Fact&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;WHERE Week = '201701'&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Group By Week ,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;ApplyMap('map1', Week) &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 19:38:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Correct-way-of-mapping-in-a-table-with-aggregate-functions/m-p/1338656#M823590</guid>
      <dc:creator>ziadm</dc:creator>
      <dc:date>2017-07-19T19:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: Correct way of mapping in a table with aggregate functions</title>
      <link>https://community.qlik.com/t5/QlikView/Correct-way-of-mapping-in-a-table-with-aggregate-functions/m-p/1338657#M823591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Julio,&lt;/P&gt;&lt;P&gt;Why group on year or week when you have only one week of data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sales:&lt;/P&gt;&lt;P&gt;load Week,&lt;/P&gt;&lt;P&gt;applymap('map1') as Year,&lt;/P&gt;&lt;P&gt;sum(Total_Sales) as Total_Sales,&lt;/P&gt;&lt;P&gt;resident Fact&lt;/P&gt;&lt;P&gt;where Week = '201701';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 19:51:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Correct-way-of-mapping-in-a-table-with-aggregate-functions/m-p/1338657#M823591</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2017-07-19T19:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: Correct way of mapping in a table with aggregate functions</title>
      <link>https://community.qlik.com/t5/QlikView/Correct-way-of-mapping-in-a-table-with-aggregate-functions/m-p/1338658#M823592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In line 20, Instead of "group by Week,Year", try "group by Week, ApplyMap('map1',Week)"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 19:51:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Correct-way-of-mapping-in-a-table-with-aggregate-functions/m-p/1338658#M823592</guid>
      <dc:creator>manas_bn</dc:creator>
      <dc:date>2017-07-19T19:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Correct way of mapping in a table with aggregate functions</title>
      <link>https://community.qlik.com/t5/QlikView/Correct-way-of-mapping-in-a-table-with-aggregate-functions/m-p/1338659#M823593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah it is just a sample. In production it wouldn't be filtered by a single week.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 20:28:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Correct-way-of-mapping-in-a-table-with-aggregate-functions/m-p/1338659#M823593</guid>
      <dc:creator>julioarriaga</dc:creator>
      <dc:date>2017-07-19T20:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Correct way of mapping in a table with aggregate functions</title>
      <link>https://community.qlik.com/t5/QlikView/Correct-way-of-mapping-in-a-table-with-aggregate-functions/m-p/1338660#M823594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, that was the problem, I was doing it with the alias.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 21:15:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Correct-way-of-mapping-in-a-table-with-aggregate-functions/m-p/1338660#M823594</guid>
      <dc:creator>julioarriaga</dc:creator>
      <dc:date>2017-07-19T21:15:23Z</dc:date>
    </item>
  </channel>
</rss>

