<?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 If statement condition not calculating in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/If-statement-condition-not-calculating/m-p/1607133#M45024</link>
    <description>&lt;P&gt;Can someone tell me why this isn't working?&lt;/P&gt;&lt;P&gt;Count(If(Floor([Date]) &amp;gt;= FirstWorkDate(Max([Date]),5),[Id]))&lt;/P&gt;&lt;P&gt;[Date] is a field that holds a date (duh). [Id] is the primary key of the table. Essentially, I am just trying to find out how many records have a specific date between 5 business days ago and now.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I break it down, it seems like it should work:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Max([Date]) = 7/28/2019.&amp;nbsp; &amp;nbsp;This is correct.&lt;/LI&gt;&lt;LI&gt;FirstWorkDate(Max([Date]),5) = 7/22/2019.&amp;nbsp; &amp;nbsp;This is also correct.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Yet when I try the whole formula, I get an undefined value ("-").&lt;/P&gt;&lt;P&gt;I did* try changing the Max([Date]) to RangeMax([Date]), but that ends up returning a value that's way too high.&lt;/P&gt;&lt;P&gt;I also tried creating a variable for&amp;nbsp;FirstWorkDate(Max([Date]),5), then including it in the original formula, but that gives me a nested aggregation error.&lt;/P&gt;&lt;P&gt;I appreciate the help in advance.&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 20:21:57 GMT</pubDate>
    <dc:creator>acbishop2</dc:creator>
    <dc:date>2024-11-16T20:21:57Z</dc:date>
    <item>
      <title>If statement condition not calculating</title>
      <link>https://community.qlik.com/t5/App-Development/If-statement-condition-not-calculating/m-p/1607133#M45024</link>
      <description>&lt;P&gt;Can someone tell me why this isn't working?&lt;/P&gt;&lt;P&gt;Count(If(Floor([Date]) &amp;gt;= FirstWorkDate(Max([Date]),5),[Id]))&lt;/P&gt;&lt;P&gt;[Date] is a field that holds a date (duh). [Id] is the primary key of the table. Essentially, I am just trying to find out how many records have a specific date between 5 business days ago and now.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I break it down, it seems like it should work:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Max([Date]) = 7/28/2019.&amp;nbsp; &amp;nbsp;This is correct.&lt;/LI&gt;&lt;LI&gt;FirstWorkDate(Max([Date]),5) = 7/22/2019.&amp;nbsp; &amp;nbsp;This is also correct.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Yet when I try the whole formula, I get an undefined value ("-").&lt;/P&gt;&lt;P&gt;I did* try changing the Max([Date]) to RangeMax([Date]), but that ends up returning a value that's way too high.&lt;/P&gt;&lt;P&gt;I also tried creating a variable for&amp;nbsp;FirstWorkDate(Max([Date]),5), then including it in the original formula, but that gives me a nested aggregation error.&lt;/P&gt;&lt;P&gt;I appreciate the help in advance.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 20:21:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-statement-condition-not-calculating/m-p/1607133#M45024</guid>
      <dc:creator>acbishop2</dc:creator>
      <dc:date>2024-11-16T20:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: If statement condition not calculating</title>
      <link>https://community.qlik.com/t5/App-Development/If-statement-condition-not-calculating/m-p/1607273#M45047</link>
      <description>&lt;P&gt;Try re-arranging this :&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If(Floor([Date]) &amp;gt;= FirstWorkDate(Max([Date]),5),Count([Id]), 0)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 04:18:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-statement-condition-not-calculating/m-p/1607273#M45047</guid>
      <dc:creator>Lisa_P</dc:creator>
      <dc:date>2019-07-30T04:18:37Z</dc:date>
    </item>
  </channel>
</rss>

