<?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 YTD average calc in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/YTD-average-calc/m-p/214363#M503111</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to ascertain the best way to do a YTD average calc. My app has a field called balance and is the user selects a single date.&lt;/P&gt;&lt;P&gt;I am trying to get the average from start of year to date selected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Jul 2010 11:50:16 GMT</pubDate>
    <dc:creator>alan_grn</dc:creator>
    <dc:date>2010-07-05T11:50:16Z</dc:date>
    <item>
      <title>YTD average calc</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-average-calc/m-p/214363#M503111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to ascertain the best way to do a YTD average calc. My app has a field called balance and is the user selects a single date.&lt;/P&gt;&lt;P&gt;I am trying to get the average from start of year to date selected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jul 2010 11:50:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-average-calc/m-p/214363#M503111</guid>
      <dc:creator>alan_grn</dc:creator>
      <dc:date>2010-07-05T11:50:16Z</dc:date>
    </item>
    <item>
      <title>YTD average calc</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-average-calc/m-p/214364#M503112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Alan,&lt;/P&gt;&lt;P&gt;One way to achieve it would be using Set Analysis, given that the user has selected one date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum({&amp;lt; DateField = {"&amp;gt;=$(=Date(YearStart(vSelectedDate)))&amp;lt;=$(=Date(vSelectedDate))"} &amp;gt;} Balance)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Using DateField as the field with dates you want to use and vSelectedDate a variable in which you store the date selected. Instead of the variable, though, you can use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;GetFieldSelections(DateField)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jul 2010 12:39:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-average-calc/m-p/214364#M503112</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-07-05T12:39:42Z</dc:date>
    </item>
    <item>
      <title>YTD average calc</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-average-calc/m-p/214365#M503113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;And if I wanted the average would I just replace Sum with average or would I take the above and divide by the count of the above?&lt;/P&gt;&lt;P&gt;Hope that makes sense.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jul 2010 13:26:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-average-calc/m-p/214365#M503113</guid>
      <dc:creator>alan_grn</dc:creator>
      <dc:date>2010-07-05T13:26:47Z</dc:date>
    </item>
    <item>
      <title>YTD average calc</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-average-calc/m-p/214366#M503114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Just had a rethink. What I am trying to do is get the average balance on each account and them sum it through for customer, area etc.&lt;/P&gt;&lt;P&gt;Maybe use of Aggr?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jul 2010 13:57:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-average-calc/m-p/214366#M503114</guid>
      <dc:creator>alan_grn</dc:creator>
      <dc:date>2010-07-05T13:57:06Z</dc:date>
    </item>
    <item>
      <title>YTD average calc</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-average-calc/m-p/214367#M503115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Alan,&lt;/P&gt;&lt;P&gt;Depending on how your charts are designed and which your dimensions are, aggr() may be a solution. An to your question above yes, set analysis may be used on any aggregation expression you need.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jul 2010 15:03:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-average-calc/m-p/214367#M503115</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-07-05T15:03:10Z</dc:date>
    </item>
  </channel>
</rss>

