<?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: How to average the values for alternate states? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-average-the-values-for-alternate-states/m-p/988132#M972143</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the additional insight. Fortunately in my case the data is of the same size.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Sep 2015 13:38:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-09-08T13:38:42Z</dc:date>
    <item>
      <title>How to average the values for alternate states?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-average-the-values-for-alternate-states/m-p/988129#M972140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Qlikview Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Browsed through discussions here regarding alternate states but can't find anything on averages. I have three alternate states - A, B, C. &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Not&lt;/STRONG&gt;&lt;/SPAN&gt; all three states will always have selections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I have the following variables:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;v1 = &lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;({&lt;SPAN style="color: #0000ff;"&gt;&lt;A&gt;&lt;/A&gt;&lt;/SPAN&gt;}&lt;SPAN style="color: #800000;"&gt;[Size]&lt;/SPAN&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;v2 = &lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;({&lt;SPAN style="color: #0000ff;"&gt;&lt;B&gt;&lt;/B&gt;&lt;/SPAN&gt;}&lt;SPAN style="color: #800000;"&gt;[Size]&lt;/SPAN&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;v3 = &lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;({&lt;SPAN style="color: #0000ff;"&gt;&lt;C&gt;&lt;/C&gt;&lt;/SPAN&gt;}&lt;SPAN style="color: #800000;"&gt;[Size])&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;I then want to&lt;/SPAN&gt; get the average value for [Size] of those three (keeping in mind also that not all three alternate states are always at use). How would that expression look like?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;So far this works:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;=(sum&lt;/SPAN&gt;({&lt;SPAN style="color: #0000ff;"&gt;&lt;A&gt;&lt;/A&gt;&lt;/SPAN&gt;}&lt;SPAN style="color: #800000;"&gt;[Size]&lt;/SPAN&gt;) + &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;({&lt;SPAN style="color: #0000ff;"&gt;&lt;B&gt;&lt;/B&gt;&lt;/SPAN&gt;}&lt;SPAN style="color: #800000;"&gt;[Size]&lt;/SPAN&gt;) + &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;({&lt;SPAN style="color: #0000ff;"&gt;&lt;C&gt;&lt;/C&gt;&lt;/SPAN&gt;}&lt;SPAN style="color: #800000;"&gt;[Size])&lt;/SPAN&gt; )/3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;However the hardcoded denominator will only make sense when there are always three alternate states at use, which is not the case.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hope someone can help! Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Sep 2015 11:32:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-average-the-values-for-alternate-states/m-p/988129#M972140</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-07T11:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to average the values for alternate states?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-average-the-values-for-alternate-states/m-p/988130#M972141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try rangeavg(&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333320617676px; font-family: inherit; color: #0000ff;"&gt;sum&lt;/SPAN&gt;({&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333320617676px; font-family: inherit; color: #0000ff;"&gt;&lt;A&gt;&lt;/A&gt;&lt;/SPAN&gt;}&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333320617676px; font-family: inherit; color: #800000;"&gt;[Size]&lt;/SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333320617676px; font-family: inherit; color: #0000ff;"&gt;sum&lt;/SPAN&gt;({&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333320617676px; font-family: inherit; color: #0000ff;"&gt;&lt;B&gt;&lt;/B&gt;&lt;/SPAN&gt;}&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333320617676px; font-family: inherit; color: #800000;"&gt;[Size]&lt;/SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333320617676px; font-family: inherit; color: #0000ff;"&gt;sum&lt;/SPAN&gt;({&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333320617676px; font-family: inherit; color: #0000ff;"&gt;&lt;C&gt;&lt;/C&gt;&lt;/SPAN&gt;}&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333320617676px; font-family: inherit; color: #800000;"&gt;[Size])&lt;/SPAN&gt; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or if you want to check for selections in each state:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rangeavg(&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(len(getcurrentselections (&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;'|', ';', ',', 9, 'A'&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)), &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333320617676px; font-family: inherit; color: #0000ff;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;({&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333320617676px; font-family: inherit; color: #0000ff;"&gt;&lt;A&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;}&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333320617676px; font-family: inherit; color: #800000;"&gt;[Size]&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;), Null()),&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN class="Bold" style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(len(getcurrentselections (&lt;/SPAN&gt;&lt;SPAN class="Italic" style="font-size: 13.3333330154419px;"&gt;'|', ';', ',', 9, 'B'&lt;/SPAN&gt;&lt;SPAN class="Bold" style="font-size: 13.3333330154419px;"&gt;)), &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333320617676px; font-family: inherit; color: #0000ff;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;({&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333320617676px; font-family: inherit; color: #0000ff;"&gt;&lt;B&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;}&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333320617676px; font-family: inherit; color: #800000;"&gt;[Size]&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;), Null()),&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN class="Bold" style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(len(getcurrentselections (&lt;/SPAN&gt;&lt;SPAN class="Italic" style="font-size: 13.3333330154419px;"&gt;'|', ';', ',', 9, 'C'&lt;/SPAN&gt;&lt;SPAN class="Bold" style="font-size: 13.3333330154419px;"&gt;)), &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333320617676px; font-family: inherit; color: #0000ff;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;({&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333320617676px; font-family: inherit; color: #0000ff;"&gt;&lt;C&gt;&lt;/C&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;}&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333320617676px; font-family: inherit; color: #800000;"&gt;[Size]&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;), Null())&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Sep 2015 15:19:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-average-the-values-for-alternate-states/m-p/988130#M972141</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-09-07T15:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to average the values for alternate states?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-average-the-values-for-alternate-states/m-p/988131#M972142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also, you will only have a ideal representation of an average if the record count of Size is the same for all alternate states. If not you will get a weighted average as a result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Sep 2015 15:23:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-average-the-values-for-alternate-states/m-p/988131#M972142</guid>
      <dc:creator>simondachstr</dc:creator>
      <dc:date>2015-09-07T15:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to average the values for alternate states?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-average-the-values-for-alternate-states/m-p/988132#M972143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the additional insight. Fortunately in my case the data is of the same size.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2015 13:38:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-average-the-values-for-alternate-states/m-p/988132#M972143</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-08T13:38:42Z</dc:date>
    </item>
  </channel>
</rss>

