<?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 Group by on a Date.. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Group-by-on-a-Date/m-p/231296#M83066</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello all!&lt;/P&gt;&lt;P&gt;I have a table with currency rates per day and I would like to calculate an average rate per month. Why doesnt my script below work?&lt;/P&gt;&lt;P&gt;The currency rate table (tmpCurrencyRates) looks like this:&lt;/P&gt;&lt;P&gt;Date, USD,DKK,NOK&lt;/P&gt;&lt;P&gt;2009-02-03 1,232 4,123 2,341&lt;/P&gt;&lt;P&gt;2009-02-04 1,543 4,765 2,567&lt;/P&gt;&lt;P&gt;---------------------------------------&lt;/P&gt;&lt;P&gt;script:&lt;/P&gt;&lt;P&gt;CurrencyRates:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;date(date#(left(Date, 7), 'YYYY-MM'), 'YYYY-MM') as CurrencyPeriod,&lt;/P&gt;&lt;P&gt;avg(USD) as aUSD,&lt;/P&gt;&lt;P&gt;avg(DKK) as aDKK,&lt;/P&gt;&lt;P&gt;avg(NOK) as aNOK&lt;/P&gt;&lt;P&gt;resident tmpCurrencyRates&lt;/P&gt;&lt;P&gt;group by CurrencyPeriod;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Br&lt;/P&gt;&lt;P&gt;Cristian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 May 2010 21:15:15 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-05-04T21:15:15Z</dc:date>
    <item>
      <title>Group by on a Date..</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-on-a-Date/m-p/231296#M83066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello all!&lt;/P&gt;&lt;P&gt;I have a table with currency rates per day and I would like to calculate an average rate per month. Why doesnt my script below work?&lt;/P&gt;&lt;P&gt;The currency rate table (tmpCurrencyRates) looks like this:&lt;/P&gt;&lt;P&gt;Date, USD,DKK,NOK&lt;/P&gt;&lt;P&gt;2009-02-03 1,232 4,123 2,341&lt;/P&gt;&lt;P&gt;2009-02-04 1,543 4,765 2,567&lt;/P&gt;&lt;P&gt;---------------------------------------&lt;/P&gt;&lt;P&gt;script:&lt;/P&gt;&lt;P&gt;CurrencyRates:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;date(date#(left(Date, 7), 'YYYY-MM'), 'YYYY-MM') as CurrencyPeriod,&lt;/P&gt;&lt;P&gt;avg(USD) as aUSD,&lt;/P&gt;&lt;P&gt;avg(DKK) as aDKK,&lt;/P&gt;&lt;P&gt;avg(NOK) as aNOK&lt;/P&gt;&lt;P&gt;resident tmpCurrencyRates&lt;/P&gt;&lt;P&gt;group by CurrencyPeriod;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Br&lt;/P&gt;&lt;P&gt;Cristian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 May 2010 21:15:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-on-a-Date/m-p/231296#M83066</guid>
      <dc:creator />
      <dc:date>2010-05-04T21:15:15Z</dc:date>
    </item>
    <item>
      <title>Group by on a Date..</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-on-a-Date/m-p/231297#M83067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try with&lt;/P&gt;&lt;P style="font-style: italic"&gt;&lt;/P&gt;&lt;P style="font-style: italic"&gt;CurrencyRates:&lt;/P&gt;&lt;P&gt;&lt;I&gt;load&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;date(date#(left(Date, 7), 'YYYY-MM'), 'YYYY-MM') as CurrencyPeriod,&lt;/I&gt;&lt;/P&gt;&lt;P style="font-style: italic"&gt;avg(USD) as aUSD,&lt;/P&gt;&lt;P style="font-style: italic"&gt;avg(DKK) as aDKK,&lt;/P&gt;&lt;P style="font-style: italic"&gt;avg(NOK) as aNOK&lt;/P&gt;&lt;P&gt;&lt;EM&gt;resident&lt;/EM&gt; tmpCurrencyRates&lt;/P&gt;&lt;P style="font-style: italic"&gt;group by date(date#(left(Date, 7), 'YYYY-MM'), 'YYYY-MM');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 May 2010 21:23:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-on-a-Date/m-p/231297#M83067</guid>
      <dc:creator />
      <dc:date>2010-05-04T21:23:46Z</dc:date>
    </item>
    <item>
      <title>Group by on a Date..</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-on-a-Date/m-p/231298#M83068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Worked great! Thank you!&lt;/P&gt;&lt;P&gt;Br&lt;/P&gt;&lt;P&gt;Cristian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 May 2010 21:31:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-on-a-Date/m-p/231298#M83068</guid>
      <dc:creator />
      <dc:date>2010-05-04T21:31:26Z</dc:date>
    </item>
  </channel>
</rss>

