<?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: How to Min date from multiple dates from Date field in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-Min-date-from-multiple-dates-from-Date-field/m-p/1889173#M73262</link>
    <description>&lt;P&gt;It's still not clear to me what you want to do.&lt;/P&gt;&lt;P&gt;If you want to filter out the "correct" records, then you should probably use a "where"-clause already in the script, e.g.&lt;BR /&gt;... where Ceil([Missed Call Date Time]) = Floor([Job Card Date Time])&lt;/P&gt;&lt;P&gt;Then you will only get the records where [Missed Call Date Time] is during the day before [Job Card Date Time].&lt;/P&gt;&lt;P&gt;But if you want to display the data in a chart, e.g. a pivot table in the UI, you first must decide what your dimension is. You will get one row per dimensional value. So it could be that your dimension is&lt;BR /&gt;* The call enter&lt;BR /&gt;* An issue number&lt;BR /&gt;* The record itself. Then you should create a RecordID in the script, e.g. RowNo() as RecordID&lt;/P&gt;&lt;P&gt;Once that is done, you can start adding your fields, and you can have exactly the ones you have in the screenshot. Add them as measures (not as dimensions) so you don't change the number of records in the table.&lt;/P&gt;&lt;P&gt;One measure could be&lt;BR /&gt;If(Ceil(Max([Missed Call Date Time])) = Floor(Min([Job Card Date Time]),'Correct','Incorrect')&lt;BR /&gt;so you get a flag for this condition.&lt;/P&gt;&lt;P&gt;Note that Min() and Max() are calculated only within the relevant dimensional value. That's why it is important to decide the dimension first.&lt;/P&gt;&lt;P&gt;See also &lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/Dimensions-and-Measures/ba-p/1473017" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/Dimensions-and-Measures/ba-p/1473017&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Feb 2022 11:48:42 GMT</pubDate>
    <dc:creator>hic</dc:creator>
    <dc:date>2022-02-04T11:48:42Z</dc:date>
    <item>
      <title>How to Min date from multiple dates from Date field</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-Min-date-from-multiple-dates-from-Date-field/m-p/1889070#M73247</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am implementing logic to show&amp;nbsp; min job card date time data only.&lt;/P&gt;
&lt;P&gt;please find below snapshot of data set I am using.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SheetalB_2-1643965210208.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/71594i2DA7CA19082D3E54/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SheetalB_2-1643965210208.png" alt="SheetalB_2-1643965210208.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Desired output should be&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SheetalB_3-1643965238254.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/71595i3104F2146775ED2B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SheetalB_3-1643965238254.png" alt="SheetalB_3-1643965238254.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I have tried firstsortedvalue, Min funtion. But its not working&lt;/P&gt;
&lt;P&gt;Kindly help..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Sheetal&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 09:01:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-Min-date-from-multiple-dates-from-Date-field/m-p/1889070#M73247</guid>
      <dc:creator>SheetalB</dc:creator>
      <dc:date>2022-02-04T09:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to Min date from multiple dates from Date field</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-Min-date-from-multiple-dates-from-Date-field/m-p/1889101#M73250</link>
      <description>&lt;P&gt;Min([Job Card Date Time]) should work just fine.&lt;/P&gt;&lt;P&gt;But the question is: What is your dimension - the grouping field? What field(s) do you want to use to define the number of rows in the output table?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 10:04:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-Min-date-from-multiple-dates-from-Date-field/m-p/1889101#M73250</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2022-02-04T10:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to Min date from multiple dates from Date field</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-Min-date-from-multiple-dates-from-Date-field/m-p/1889110#M73253</link>
      <description>&lt;P&gt;I agree with &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6622"&gt;@hic&lt;/a&gt; 's answer.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;To add more context to that answer, here are the steps that I have followed to get your desired outcome:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;1. The dataset:&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="IMAGE" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/39d7e0b6-ebea-43c2-b91e-1ed113a9ca43.default.PNG" /&gt;&lt;/P&gt;

&lt;P&gt;2. Added all the dimensions to the table except the last one&lt;/P&gt;

&lt;P&gt;3. For the &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;JobCardDateTime &lt;/STRONG&gt;&lt;/SPAN&gt;I have used the dimension expression:&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;=&lt;SPAN style="color:#2980b9"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color:#f39c12"&gt;JobCardDateTime &lt;/SPAN&gt;= &lt;SPAN style="color:#2980b9"&gt;Min&lt;/SPAN&gt;(&lt;SPAN style="color:#3498db"&gt;TOTAL&lt;/SPAN&gt; &lt;SPAN style="color:#f39c12"&gt;JobCardDateTime&lt;/SPAN&gt;), &lt;SPAN style="color:#2980b9"&gt;Date&lt;/SPAN&gt;(&lt;SPAN style="color:#f39c12"&gt;JobCardDateTime&lt;/SPAN&gt;, &lt;SPAN style="color:#27ae60"&gt;'DD/MM/YYYY h:mm:ss[.fff]'&lt;/SPAN&gt;), &lt;SPAN style="color:#2980b9"&gt;Null&lt;/SPAN&gt;())&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;4. This expression checks if the current datetime is equals to the&lt;STRONG&gt; &lt;SPAN style="color:#2980b9"&gt;Min&lt;/SPAN&gt;()&lt;/STRONG&gt; datetime from the entire dataset. In the event that it is equal, return the datetime value, otherwise return &lt;STRONG&gt;&lt;SPAN style="color:#2980b9"&gt;Null&lt;/SPAN&gt;()&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;5. Don't forget to un-check the&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt; "Include null values" &lt;/STRONG&gt;&lt;/SPAN&gt;under&lt;STRONG&gt; Data &amp;gt; Columns &amp;gt; JobCardDateTime (dimension)&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;6. The output is:&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="IMAGE" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/63992873-c608-453a-8736-7da232359930.default.PNG" /&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color:#7f8c8d"&gt;&lt;EM&gt;&lt;STRONG&gt;I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, please mark it as accepted solution to give further visibility to other community members.&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;
&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 10:15:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-Min-date-from-multiple-dates-from-Date-field/m-p/1889110#M73253</guid>
      <dc:creator>Andrei_Cusnir</dc:creator>
      <dc:date>2022-02-04T10:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to Min date from multiple dates from Date field</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-Min-date-from-multiple-dates-from-Date-field/m-p/1889142#M73258</link>
      <description>&lt;P&gt;Hello Henric,&lt;/P&gt;
&lt;P&gt;I want to show all fields from the snapshot as below. The logic is job card date time should be immediate date after missed call date and time . Here missed call date is 29th Dec 21 and&amp;nbsp; immediate date is 30th Dec 21. That's why I want show this in my report.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SheetalB_0-1643972717725.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/71609iA9752A1E7028DFF6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SheetalB_0-1643972717725.png" alt="SheetalB_0-1643972717725.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 11:09:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-Min-date-from-multiple-dates-from-Date-field/m-p/1889142#M73258</guid>
      <dc:creator>SheetalB</dc:creator>
      <dc:date>2022-02-04T11:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to Min date from multiple dates from Date field</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-Min-date-from-multiple-dates-from-Date-field/m-p/1889173#M73262</link>
      <description>&lt;P&gt;It's still not clear to me what you want to do.&lt;/P&gt;&lt;P&gt;If you want to filter out the "correct" records, then you should probably use a "where"-clause already in the script, e.g.&lt;BR /&gt;... where Ceil([Missed Call Date Time]) = Floor([Job Card Date Time])&lt;/P&gt;&lt;P&gt;Then you will only get the records where [Missed Call Date Time] is during the day before [Job Card Date Time].&lt;/P&gt;&lt;P&gt;But if you want to display the data in a chart, e.g. a pivot table in the UI, you first must decide what your dimension is. You will get one row per dimensional value. So it could be that your dimension is&lt;BR /&gt;* The call enter&lt;BR /&gt;* An issue number&lt;BR /&gt;* The record itself. Then you should create a RecordID in the script, e.g. RowNo() as RecordID&lt;/P&gt;&lt;P&gt;Once that is done, you can start adding your fields, and you can have exactly the ones you have in the screenshot. Add them as measures (not as dimensions) so you don't change the number of records in the table.&lt;/P&gt;&lt;P&gt;One measure could be&lt;BR /&gt;If(Ceil(Max([Missed Call Date Time])) = Floor(Min([Job Card Date Time]),'Correct','Incorrect')&lt;BR /&gt;so you get a flag for this condition.&lt;/P&gt;&lt;P&gt;Note that Min() and Max() are calculated only within the relevant dimensional value. That's why it is important to decide the dimension first.&lt;/P&gt;&lt;P&gt;See also &lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/Dimensions-and-Measures/ba-p/1473017" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/Dimensions-and-Measures/ba-p/1473017&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 11:48:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-Min-date-from-multiple-dates-from-Date-field/m-p/1889173#M73262</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2022-02-04T11:48:42Z</dc:date>
    </item>
  </channel>
</rss>

