<?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 DateTime Comparison in Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/DateTime-Comparison-in-Set-Analysis/m-p/1123736#M914006</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have scenario where I have 2 DateTime fields and I would like to compare the two to retrieve a value. I tried set analysis but it doesn't seem to work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case I only want to return the latest "Card_Allocation_DateTime" where "Shift_DateTime" is greater than &lt;SPAN style="font-size: 13.3333330154419px;"&gt;"Card_Allocation_DateTime". &lt;SPAN style="font-size: 13.3333330154419px;"&gt;How can this be done?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see my qvw and spreadsheet (with source data and desired results)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>DateTime Comparison in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/DateTime-Comparison-in-Set-Analysis/m-p/1123736#M914006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have scenario where I have 2 DateTime fields and I would like to compare the two to retrieve a value. I tried set analysis but it doesn't seem to work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case I only want to return the latest "Card_Allocation_DateTime" where "Shift_DateTime" is greater than &lt;SPAN style="font-size: 13.3333330154419px;"&gt;"Card_Allocation_DateTime". &lt;SPAN style="font-size: 13.3333330154419px;"&gt;How can this be done?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see my qvw and spreadsheet (with source data and desired results)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DateTime-Comparison-in-Set-Analysis/m-p/1123736#M914006</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime Comparison in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/DateTime-Comparison-in-Set-Analysis/m-p/1123737#M914007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tumelo,&lt;/P&gt;&lt;P&gt;This is better to do with If: Max(TOTAL &amp;lt;Card_ID,Shift_DateTime&amp;gt;&amp;nbsp; If(Shift_DateTime&amp;gt;Card_Allocation_DateTime, Card_Allocation_DateTime))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2016 11:51:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DateTime-Comparison-in-Set-Analysis/m-p/1123737#M914007</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-03T11:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime Comparison in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/DateTime-Comparison-in-Set-Analysis/m-p/1123738#M914008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manuel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This doesn't work either, can you please attach an app?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2016 11:58:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DateTime-Comparison-in-Set-Analysis/m-p/1123738#M914008</guid>
      <dc:creator />
      <dc:date>2016-06-03T11:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime Comparison in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/DateTime-Comparison-in-Set-Analysis/m-p/1123739#M914009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tumelo,&lt;/P&gt;&lt;P&gt;See attached file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2016 12:00:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DateTime-Comparison-in-Set-Analysis/m-p/1123739#M914009</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-03T12:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime Comparison in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/DateTime-Comparison-in-Set-Analysis/m-p/1123740#M914010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply manuel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the expression returns Null. I would like it to give me something like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 704px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" width="187"&gt;Shift_DateTime&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="53"&gt;Card_ID&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="135"&gt;Card_AllocationStatus&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="140"&gt;Card_AllocationReason&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="189"&gt;Card_Allocation_DateTime&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" style="border-top: none;"&gt;2014/07/08 12:58:23&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;7440&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Card Allocated&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2016/03/27 17:03:25&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2016 12:10:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DateTime-Comparison-in-Set-Analysis/m-p/1123740#M914010</guid>
      <dc:creator />
      <dc:date>2016-06-03T12:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime Comparison in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/DateTime-Comparison-in-Set-Analysis/m-p/1123741#M914011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tumelo, can you try this expression?&lt;/P&gt;&lt;P&gt;If(Card_Allocation_DateTime=Max(TOTAL &amp;lt;Card_ID&amp;gt; Card_Allocation_DateTime)&lt;/P&gt;&lt;P&gt; and Shift_DateTime&amp;lt;Max(TOTAL &amp;lt;Card_ID&amp;gt; Card_Allocation_DateTime), Max(TOTAL &amp;lt;Card_ID&amp;gt; Card_Allocation_DateTime))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2016 12:17:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DateTime-Comparison-in-Set-Analysis/m-p/1123741#M914011</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-06-03T12:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime Comparison in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/DateTime-Comparison-in-Set-Analysis/m-p/1123742#M914012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Returns Null because all dates on Card_Allocation_DateTime are greater of Shift_DateTime, there aren't any date where Shift_DateTime &amp;gt; Card_Allocation_DateTime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to show last Card_Allocation_DateTime &amp;gt; Shift_DateTime, then Max(TOTAL &amp;lt;Card_ID,Shift_DateTime&amp;gt;&amp;nbsp; If(Shift_DateTime&amp;lt;Card_Allocation_DateTime, Card_Allocation_DateTime)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your requirement say: return the latest "Card_Allocation_DateTime" where "Shift_DateTime" is greater than &lt;SPAN style="font-size: 13.3333330154419px;"&gt;"Card_Allocation_DateTime", and you want: return the latest "Card_Allocation_DateTime" where "&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Card_Allocation_DateTime&lt;/SPAN&gt;" is greater than &lt;SPAN style="font-size: 13.3333330154419px;"&gt;"&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Shift_DateTime&lt;/SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Regards!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2016 12:22:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DateTime-Comparison-in-Set-Analysis/m-p/1123742#M914012</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-03T12:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime Comparison in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/DateTime-Comparison-in-Set-Analysis/m-p/1123743#M914013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ruben, this is perfect&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2016 12:36:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DateTime-Comparison-in-Set-Analysis/m-p/1123743#M914013</guid>
      <dc:creator />
      <dc:date>2016-06-03T12:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime Comparison in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/DateTime-Comparison-in-Set-Analysis/m-p/1123744#M914014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Manuel, I didn't ask correctly but thanks a lot for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2016 12:42:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DateTime-Comparison-in-Set-Analysis/m-p/1123744#M914014</guid>
      <dc:creator />
      <dc:date>2016-06-03T12:42:36Z</dc:date>
    </item>
  </channel>
</rss>

