<?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 workaround for nested aggregation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/workaround-for-nested-aggregation/m-p/20573#M606773</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;My case: &lt;/P&gt;&lt;P&gt;i'm calculation order duration based on various fields and am storing them in various other fields, more or less like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp; If(([Status]= '512'), (Today()-[OrdStartDate]))as OrdDurationActive,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(([Status]= '1024'), ([OrdRS1024Date]-[OrdStartDate]))as OrdDurationWon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I need to use this method because the duration is based on various fields. In practice, this leads to 4 nulls and one filled value, because based on the status, only one of 5 fields is filled. It isn't possible for more than one field to have a value.&lt;/P&gt;&lt;P&gt;This results in 5 different fields for different states. Now I want to create one average based on these various fields.&lt;/P&gt;&lt;P&gt;So in this case:&lt;/P&gt;&lt;P&gt;ID | Status | Active Duration | Won Duration&lt;/P&gt;&lt;P&gt;Order 1 | Won | - | 200 | &lt;/P&gt;&lt;P&gt;Order 2 | Active | 123 | - |&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The average of these two should be (200+123)/2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How should I achieve this? I've played around with Sum(Avg(..)+Avg(..)), et cetera, but didn't get the right results yet...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 May 2018 14:24:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-05-28T14:24:50Z</dc:date>
    <item>
      <title>workaround for nested aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/workaround-for-nested-aggregation/m-p/20573#M606773</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;My case: &lt;/P&gt;&lt;P&gt;i'm calculation order duration based on various fields and am storing them in various other fields, more or less like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp; If(([Status]= '512'), (Today()-[OrdStartDate]))as OrdDurationActive,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(([Status]= '1024'), ([OrdRS1024Date]-[OrdStartDate]))as OrdDurationWon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I need to use this method because the duration is based on various fields. In practice, this leads to 4 nulls and one filled value, because based on the status, only one of 5 fields is filled. It isn't possible for more than one field to have a value.&lt;/P&gt;&lt;P&gt;This results in 5 different fields for different states. Now I want to create one average based on these various fields.&lt;/P&gt;&lt;P&gt;So in this case:&lt;/P&gt;&lt;P&gt;ID | Status | Active Duration | Won Duration&lt;/P&gt;&lt;P&gt;Order 1 | Won | - | 200 | &lt;/P&gt;&lt;P&gt;Order 2 | Active | 123 | - |&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The average of these two should be (200+123)/2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How should I achieve this? I've played around with Sum(Avg(..)+Avg(..)), et cetera, but didn't get the right results yet...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2018 14:24:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/workaround-for-nested-aggregation/m-p/20573#M606773</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-28T14:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: workaround for nested aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/workaround-for-nested-aggregation/m-p/20574#M606776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps like this: Avg(RangeSum([Active Duration],[Won Duration]))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2018 16:16:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/workaround-for-nested-aggregation/m-p/20574#M606776</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2018-05-28T16:16:56Z</dc:date>
    </item>
  </channel>
</rss>

