<?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 Aggregation with variable Periods in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggregation-with-variable-Periods/m-p/157935#M504476</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your answer Mr. Heijnen. However, it seems to me that it isn't allowed to use expressions in an aggregation function. The manual says:&lt;/P&gt;&lt;P&gt;" ﻿﻿﻿Each dimension must be a single field. It may not be an expression (calculated dimension)."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A walkaround would be to create a variable and use the function &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(getselectedcount(week),week,&lt;/P&gt;&lt;P&gt;if(getselectedcount(month),month,&lt;/P&gt;&lt;P&gt;year)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create 3 charts with different periods but that have exactly the same layout. Use the variable in a conditional show to show the right chart to the user. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Oct 2011 17:18:19 GMT</pubDate>
    <dc:creator>tabletuner</dc:creator>
    <dc:date>2011-10-26T17:18:19Z</dc:date>
    <item>
      <title>Aggregation with variable Periods</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation-with-variable-Periods/m-p/157932#M504473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have the following diagramm&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-632_sourceID:632" /&gt;&lt;/P&gt;&lt;P&gt;It shows the average gross sales depending on the selected period. The period could be day, week and month. I can create three diagramms for every period. But I don't like it. So is it possible to make an aggr function wich use a variable for the period?&lt;/P&gt;&lt;P&gt;Something like this:&lt;/P&gt;&lt;P&gt;aggr( sum(Sales / count(AD_ID_COUNT)), Year, $(=vPeriod) )&lt;/P&gt;&lt;P&gt;but this didn't work.&lt;/P&gt;&lt;P&gt;Do you have any solution for this problem?&lt;/P&gt;&lt;P&gt;Thanks for help.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Bastian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Nov 2009 16:38:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation-with-variable-Periods/m-p/157932#M504473</guid>
      <dc:creator>btrompetter</dc:creator>
      <dc:date>2009-11-19T16:38:09Z</dc:date>
    </item>
    <item>
      <title>Aggregation with variable Periods</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation-with-variable-Periods/m-p/157933#M504474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Did anyone ever found an answer to this? I also cant get it working!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tjeerd&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2011 09:59:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation-with-variable-Periods/m-p/157933#M504474</guid>
      <dc:creator>tabletuner</dc:creator>
      <dc:date>2011-10-24T09:59:16Z</dc:date>
    </item>
    <item>
      <title>Aggregation with variable Periods</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation-with-variable-Periods/m-p/157934#M504475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Tjeerd,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To take a better look I need a testapp. But in the original topic I would skip the '=' in $(=vPeriod).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The rest looks right to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Groeten,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Halmar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2011 10:03:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation-with-variable-Periods/m-p/157934#M504475</guid>
      <dc:creator />
      <dc:date>2011-10-24T10:03:51Z</dc:date>
    </item>
    <item>
      <title>Aggregation with variable Periods</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation-with-variable-Periods/m-p/157935#M504476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your answer Mr. Heijnen. However, it seems to me that it isn't allowed to use expressions in an aggregation function. The manual says:&lt;/P&gt;&lt;P&gt;" ﻿﻿﻿Each dimension must be a single field. It may not be an expression (calculated dimension)."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A walkaround would be to create a variable and use the function &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(getselectedcount(week),week,&lt;/P&gt;&lt;P&gt;if(getselectedcount(month),month,&lt;/P&gt;&lt;P&gt;year)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create 3 charts with different periods but that have exactly the same layout. Use the variable in a conditional show to show the right chart to the user. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Oct 2011 17:18:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation-with-variable-Periods/m-p/157935#M504476</guid>
      <dc:creator>tabletuner</dc:creator>
      <dc:date>2011-10-26T17:18:19Z</dc:date>
    </item>
  </channel>
</rss>

