<?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: OTIF based on two date fields and a count in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/OTIF-based-on-two-date-fields-and-a-count/m-p/1915276#M75375</link>
    <description>&lt;P&gt;I would suggest confirming your fields are valid dates. It looks like they might be strings based on the bottom image, not dates.&lt;/P&gt;</description>
    <pubDate>Wed, 06 Apr 2022 13:48:36 GMT</pubDate>
    <dc:creator>Or</dc:creator>
    <dc:date>2022-04-06T13:48:36Z</dc:date>
    <item>
      <title>OTIF based on two date fields and a count</title>
      <link>https://community.qlik.com/t5/App-Development/OTIF-based-on-two-date-fields-and-a-count/m-p/1915139#M75371</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry to trouble the experts ... again ...!&lt;/P&gt;
&lt;P&gt;I am trying to work on an expression to create a chart for OTIF (On time in full).&lt;/P&gt;
&lt;P&gt;I have two date fields. [WADAT] (planned issue date) and [WADAT_IST] (actual issue date).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have the Dimension as the 'month' view date from the same field.&lt;/P&gt;
&lt;P&gt;I want to show the amount of orders [VBELN] that were;&lt;/P&gt;
&lt;P&gt;EARLY&amp;nbsp; &amp;nbsp; &amp;nbsp; -&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WADAT_IST &amp;lt; WADAT&lt;/P&gt;
&lt;P&gt;ON TIME -&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WADAT_IST = WADAT&lt;/P&gt;
&lt;P&gt;LATE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WADAT_IST &amp;gt; WADAT&lt;/P&gt;
&lt;P&gt;I have tried variants of:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;count (IF ( [WADAT_IST] &amp;lt; [WADAT], VBELN ))&amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Changing the &amp;lt; for = and &amp;gt; for the other measures.&lt;/P&gt;
&lt;P&gt;and&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;count({&amp;lt;[WADAT_IST] = {" &amp;lt; $(=Date([WADAT]))"}&amp;gt;} distinct [VBELN])&amp;nbsp;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again changing&amp;nbsp; the &amp;lt; for = and &amp;gt; for the other measures.&lt;/P&gt;
&lt;P&gt;But here [WADAT] is not picked up as a field, just text assume this is my "" in the wrong place.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get nothing from any of the above in the way of charted results?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this the right way to go about it, is there a better angle to take?&lt;/P&gt;
&lt;P&gt;Thanks in advance for any hints/tips/resolution.&lt;/P&gt;
&lt;P&gt;Regards, Daryn.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 12:18:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/OTIF-based-on-two-date-fields-and-a-count/m-p/1915139#M75371</guid>
      <dc:creator>Daryn</dc:creator>
      <dc:date>2022-04-06T12:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: OTIF based on two date fields and a count</title>
      <link>https://community.qlik.com/t5/App-Development/OTIF-based-on-two-date-fields-and-a-count/m-p/1915182#M75372</link>
      <description>&lt;P&gt;Your first approach, using the if(), should work assuming both fields are valid dates. What problem exactly are you encountering with it? Could you provide some sample data and expected results?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 12:51:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/OTIF-based-on-two-date-fields-and-a-count/m-p/1915182#M75372</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-04-06T12:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: OTIF based on two date fields and a count</title>
      <link>https://community.qlik.com/t5/App-Development/OTIF-based-on-two-date-fields-and-a-count/m-p/1915255#M75374</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daryn_0-1649251473302.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/76461i0C93C38124B2EF82/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daryn_0-1649251473302.png" alt="Daryn_0-1649251473302.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Image above shows results from using the count - if expressions.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am also using these fields in other charts and they are working as expected (as dates etc).&lt;/P&gt;
&lt;P&gt;I am hoping to see results similar to another chart that I use (below), using the ERDAT field but with different measures based on a completion status.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daryn_1-1649252362107.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/76464iF1C4E861EC81EFEA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daryn_1-1649252362107.png" alt="Daryn_1-1649252362107.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The data source is a SQL DB, added via load script. Not sure if I can get sample data, but will look this afternoon.&lt;/P&gt;
&lt;P&gt;Thanks for the response, appreciated.&lt;/P&gt;
&lt;P&gt;Regards, Daryn&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 13:40:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/OTIF-based-on-two-date-fields-and-a-count/m-p/1915255#M75374</guid>
      <dc:creator>Daryn</dc:creator>
      <dc:date>2022-04-06T13:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: OTIF based on two date fields and a count</title>
      <link>https://community.qlik.com/t5/App-Development/OTIF-based-on-two-date-fields-and-a-count/m-p/1915276#M75375</link>
      <description>&lt;P&gt;I would suggest confirming your fields are valid dates. It looks like they might be strings based on the bottom image, not dates.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 13:48:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/OTIF-based-on-two-date-fields-and-a-count/m-p/1915276#M75375</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-04-06T13:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: OTIF based on two date fields and a count</title>
      <link>https://community.qlik.com/t5/App-Development/OTIF-based-on-two-date-fields-and-a-count/m-p/1915295#M75376</link>
      <description>&lt;P&gt;Sometimes it just takes another pair of eyes to point out the obvious.&lt;/P&gt;
&lt;P&gt;Thank you, WADAT_IST had'nt been picked up as a date!&lt;/P&gt;
&lt;P&gt;Now to just pick the best looking chart type. But the data is now there.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daryn_0-1649254044811.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/76470i5EA9E7BD887C4637/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daryn_0-1649254044811.png" alt="Daryn_0-1649254044811.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Really appreciate the time and help.&lt;/P&gt;
&lt;P&gt;Regards Daryn&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 14:07:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/OTIF-based-on-two-date-fields-and-a-count/m-p/1915295#M75376</guid>
      <dc:creator>Daryn</dc:creator>
      <dc:date>2022-04-06T14:07:45Z</dc:date>
    </item>
  </channel>
</rss>

