<?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 Average difference between two dates in same column in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Average-difference-between-two-dates-in-same-column/m-p/2153117#M93404</link>
    <description>&lt;P&gt;Hey folks!&lt;/P&gt;
&lt;P&gt;I need to calculate the difference between two dates, which normally seems pretty easy.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But now I'm stuck because the dates are in one table field, so like this:&lt;/P&gt;
&lt;P&gt;ID | Date | Status&lt;BR /&gt;1&amp;nbsp; | 01.10.2023 |&amp;nbsp; X&lt;BR /&gt;1&amp;nbsp; | 06.11.2023 |&amp;nbsp; Y&lt;BR /&gt;1&amp;nbsp;&amp;nbsp;| 12.12.2023 |&amp;nbsp; Z (done)&lt;/P&gt;
&lt;P&gt;So now I want to find the average difference in days between status X and Z (or any other), but I'm having some trouble finding out how to do it.&lt;BR /&gt;Normally you would just work with the Avg function and substract the two dates, but I'm not finding the right set expression.&lt;/P&gt;
&lt;P&gt;I tried to do something with Aggr, but didn't work out:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Avg(Aggr({$&amp;lt;Status= {'Status X'}&amp;gt;} [Date], [ID]) - Aggr({$&amp;lt;Status = {'Status Z'}&amp;gt;} [Date], [ID]))&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Dec 2023 15:28:13 GMT</pubDate>
    <dc:creator>alliedarmour</dc:creator>
    <dc:date>2023-12-14T15:28:13Z</dc:date>
    <item>
      <title>Average difference between two dates in same column</title>
      <link>https://community.qlik.com/t5/App-Development/Average-difference-between-two-dates-in-same-column/m-p/2153117#M93404</link>
      <description>&lt;P&gt;Hey folks!&lt;/P&gt;
&lt;P&gt;I need to calculate the difference between two dates, which normally seems pretty easy.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But now I'm stuck because the dates are in one table field, so like this:&lt;/P&gt;
&lt;P&gt;ID | Date | Status&lt;BR /&gt;1&amp;nbsp; | 01.10.2023 |&amp;nbsp; X&lt;BR /&gt;1&amp;nbsp; | 06.11.2023 |&amp;nbsp; Y&lt;BR /&gt;1&amp;nbsp;&amp;nbsp;| 12.12.2023 |&amp;nbsp; Z (done)&lt;/P&gt;
&lt;P&gt;So now I want to find the average difference in days between status X and Z (or any other), but I'm having some trouble finding out how to do it.&lt;BR /&gt;Normally you would just work with the Avg function and substract the two dates, but I'm not finding the right set expression.&lt;/P&gt;
&lt;P&gt;I tried to do something with Aggr, but didn't work out:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Avg(Aggr({$&amp;lt;Status= {'Status X'}&amp;gt;} [Date], [ID]) - Aggr({$&amp;lt;Status = {'Status Z'}&amp;gt;} [Date], [ID]))&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 15:28:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Average-difference-between-two-dates-in-same-column/m-p/2153117#M93404</guid>
      <dc:creator>alliedarmour</dc:creator>
      <dc:date>2023-12-14T15:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Average difference between two dates in same column</title>
      <link>https://community.qlik.com/t5/App-Development/Average-difference-between-two-dates-in-same-column/m-p/2153121#M93405</link>
      <description>&lt;P&gt;See&amp;nbsp;&lt;A href="https://community.qlik.com/t5/QlikView-App-Dev/Comparing-dates-in-the-same-field-in-QV/td-p/487878" target="_blank"&gt;https://community.qlik.com/t5/QlikView-App-Dev/Comparing-dates-in-the-same-field-in-QV/td-p/487878&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;-Rob&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 15:32:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Average-difference-between-two-dates-in-same-column/m-p/2153121#M93405</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2023-12-14T15:32:35Z</dc:date>
    </item>
  </channel>
</rss>

