<?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: Difference between two dates with a few rules in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Difference-between-two-dates-with-a-few-rules/m-p/1886401#M73019</link>
    <description>&lt;P&gt;the 2nd condition is quite easy, just add this to your set-analysis: &lt;EM&gt;aux&lt;STRONG&gt; -&lt;/STRONG&gt;= {2}&lt;/EM&gt;.&lt;BR /&gt;the first condition i would shift into the script:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Newtable:
Load 
   RequestNumber,
   If(activityCount+finsihDateCount=4,1,0) as condition_flag
Load
   RequestNumber,
   count(activity) as activityCount,
   count(FinshDate) as finsihDateCount
resident yourtable
group by RequestNumber;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can then add this to your Set-Analysis: &lt;EM&gt;condition_flag={1}&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Jan 2022 08:39:44 GMT</pubDate>
    <dc:creator>chris_djih</dc:creator>
    <dc:date>2022-01-28T08:39:44Z</dc:date>
    <item>
      <title>Difference between two dates with a few rules</title>
      <link>https://community.qlik.com/t5/App-Development/Difference-between-two-dates-with-a-few-rules/m-p/1886135#M72992</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;First here's a table to better understand what my data looks like:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gitguto_1-1643296500412.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/71098i75B48271AB72A4B6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gitguto_1-1643296500412.png" alt="gitguto_1-1643296500412.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I need to create a measure that calculates the difference between the finish date of the &lt;STRONG&gt;activity&lt;/STRONG&gt; &lt;EM&gt;Study approval&lt;/EM&gt; and the Start Date of the &lt;STRONG&gt;activity&lt;/STRONG&gt; &lt;EM&gt;Development Stage&lt;/EM&gt; for each &lt;STRONG&gt;Request Numbe&lt;/STRONG&gt;r. And then, group them in bins and count how many requests took 0~15 days, 16~30 days and 30+days.&lt;BR /&gt;&lt;BR /&gt;But I need to filter out a few things: &lt;BR /&gt;1) count only request numbers that have a finish date for both activities. (some request numbers dont have both activities, and some have them both but dont have the finish date for 'study approval')&lt;BR /&gt;2) count only request numbers that do NOT have "aux" = 2.&lt;/P&gt;
&lt;P&gt;I manage to create the grouped dimensions with this formula, but I can't find a way to filter out these two rules.&lt;/P&gt;
&lt;P&gt;sum(aggr(if( only({&amp;lt;name = {'Study approval'}&amp;gt;}activityfinishdate)&lt;BR /&gt;-only({&amp;lt;name = {'Development stage'}&amp;gt;}activitystartdate)&amp;lt;16,1,0),[Request Number]))&lt;/P&gt;
&lt;P&gt;Here's the chart I'm trying to build:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gitguto_2-1643296878974.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/71099i6557BD0AB0F34C59/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gitguto_2-1643296878974.png" alt="gitguto_2-1643296878974.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 15:27:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Difference-between-two-dates-with-a-few-rules/m-p/1886135#M72992</guid>
      <dc:creator>gitguto</dc:creator>
      <dc:date>2022-01-27T15:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two dates with a few rules</title>
      <link>https://community.qlik.com/t5/App-Development/Difference-between-two-dates-with-a-few-rules/m-p/1886401#M73019</link>
      <description>&lt;P&gt;the 2nd condition is quite easy, just add this to your set-analysis: &lt;EM&gt;aux&lt;STRONG&gt; -&lt;/STRONG&gt;= {2}&lt;/EM&gt;.&lt;BR /&gt;the first condition i would shift into the script:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Newtable:
Load 
   RequestNumber,
   If(activityCount+finsihDateCount=4,1,0) as condition_flag
Load
   RequestNumber,
   count(activity) as activityCount,
   count(FinshDate) as finsihDateCount
resident yourtable
group by RequestNumber;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can then add this to your Set-Analysis: &lt;EM&gt;condition_flag={1}&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 08:39:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Difference-between-two-dates-with-a-few-rules/m-p/1886401#M73019</guid>
      <dc:creator>chris_djih</dc:creator>
      <dc:date>2022-01-28T08:39:44Z</dc:date>
    </item>
  </channel>
</rss>

