<?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: First Selected Value - Second, Third, Fourth, etc values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/First-Selected-Value-Second-Third-Fourth-etc-values/m-p/1141593#M904593</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Date(Max({&amp;lt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Shift_ShiftTypeName&lt;/STRONG&gt;={'Trainee'}&amp;gt;}&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Shift_StartDateTime&lt;/STRONG&gt;,1),'MM/DD/YYYY')&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=Date(Max({&amp;lt;&lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Shift_ShiftTypeName&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;={'Trainee'}&amp;gt;}&lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Shift_StartDateTime&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;,2),'MM/DD/YYYY')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=Date(Max({&amp;lt;&lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Shift_ShiftTypeName&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;={'Trainee'}&amp;gt;}&lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Shift_StartDateTime&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;,3),'MM/DD/YYYY')&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jun 2016 15:58:44 GMT</pubDate>
    <dc:creator>tamilarasu</dc:creator>
    <dc:date>2016-06-29T15:58:44Z</dc:date>
    <item>
      <title>First Selected Value - Second, Third, Fourth, etc values</title>
      <link>https://community.qlik.com/t5/QlikView/First-Selected-Value-Second-Third-Fourth-etc-values/m-p/1141591#M904591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm working to keep track of the days my trainees have each of their training shifts.&amp;nbsp; Each trainee is expected to complete a certain number of training shifts and our daily shift history reload contains all shifts published 'tomorrow' so that Qlik is always receiving the most up to date schedule prior to that day starting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the desired output.&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Name&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;EEID&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Shift 1&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Shift 2&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Shift 3&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Tom&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;49985&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6/15/16&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6/17/16&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6/19/16&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Sally&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;52636&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6/25/16&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6/27/16&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6/29/16&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;David&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;77436&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6/27/16&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6/30/16&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Tina&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;78895&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6/29/16&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've pulled the first shift date using this expression:&lt;/P&gt;&lt;P&gt;=if(Shift_ShiftTypeName='Trainee',(FirstSortedValue(Shift_StartDateTime,Shift_StartDateTime)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using that syntax, I tried this to try and get the 4th record:&lt;/P&gt;&lt;P&gt;=if(Shift_ShiftTypeName='Trainee',(FirstSortedValue(Date(Shift_StartDateTime),Shift_StartDateTime,4)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I going about this the right way?&amp;nbsp; For some of my users, their records pull up just fine and in order.&amp;nbsp; For some of the people, it will show a record for Shift 1, 2, nothing for shift 3, 4, then have a record for shift 5.&amp;nbsp; I don't really understand how it can know what record 1, 2, and 5 should be without knowing what records 3 and 4 are.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the direction, happy to provide any further details.&lt;/P&gt;&lt;P&gt;Phil&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/First-Selected-Value-Second-Third-Fourth-etc-values/m-p/1141591#M904591</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: First Selected Value - Second, Third, Fourth, etc values</title>
      <link>https://community.qlik.com/t5/QlikView/First-Selected-Value-Second-Third-Fourth-etc-values/m-p/1141592#M904592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why don't you try with Max instead of FirstSortedValue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;=If(Shift_ShiftTypeName='Trainee', Max(Shift_StartDateTime))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=If(Shift_ShiftTypeName='Trainee', Max(Shift_StartDateTime, 2))&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=If(Shift_ShiftTypeName='Trainee', Max(Shift_StartDateTime, 3))&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=If(Shift_ShiftTypeName='Trainee', Max(Shift_StartDateTime, 4))&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=If(Shift_ShiftTypeName='Trainee', Max(Shift_StartDateTime, 5))&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2016 15:56:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-Selected-Value-Second-Third-Fourth-etc-values/m-p/1141592#M904592</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-29T15:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: First Selected Value - Second, Third, Fourth, etc values</title>
      <link>https://community.qlik.com/t5/QlikView/First-Selected-Value-Second-Third-Fourth-etc-values/m-p/1141593#M904593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Date(Max({&amp;lt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Shift_ShiftTypeName&lt;/STRONG&gt;={'Trainee'}&amp;gt;}&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Shift_StartDateTime&lt;/STRONG&gt;,1),'MM/DD/YYYY')&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=Date(Max({&amp;lt;&lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Shift_ShiftTypeName&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;={'Trainee'}&amp;gt;}&lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Shift_StartDateTime&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;,2),'MM/DD/YYYY')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=Date(Max({&amp;lt;&lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Shift_ShiftTypeName&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;={'Trainee'}&amp;gt;}&lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Shift_StartDateTime&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;,3),'MM/DD/YYYY')&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2016 15:58:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-Selected-Value-Second-Third-Fourth-etc-values/m-p/1141593#M904593</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-06-29T15:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: First Selected Value - Second, Third, Fourth, etc values</title>
      <link>https://community.qlik.com/t5/QlikView/First-Selected-Value-Second-Third-Fourth-etc-values/m-p/1141594#M904594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the help, I tried this instead and it worked as intended.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Date(&lt;STRONG&gt;Min&lt;/STRONG&gt;({&amp;lt;Shift_ShiftTypeName={'Trainee'}&amp;gt;}Shift_StartDateTime,1),'MM/DD/YYYY')&lt;/P&gt;&lt;P&gt;=Date(&lt;STRONG&gt;Min&lt;/STRONG&gt;({&amp;lt;Shift_ShiftTypeName={'Trainee'}&amp;gt;}Shift_StartDateTime,2),'MM/DD/YYYY')&lt;/P&gt;&lt;P&gt;=Date(&lt;STRONG&gt;Min&lt;/STRONG&gt;({&amp;lt;Shift_ShiftTypeName={'Trainee'}&amp;gt;}Shift_StartDateTime,3),'MM/DD/YYYY')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2016 16:08:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-Selected-Value-Second-Third-Fourth-etc-values/m-p/1141594#M904594</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-29T16:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: First Selected Value - Second, Third, Fourth, etc values</title>
      <link>https://community.qlik.com/t5/QlikView/First-Selected-Value-Second-Third-Fourth-etc-values/m-p/1141595#M904595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes. You are right.&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp; We need to use Min in this case as per your sample. Have a nice day.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2016 16:14:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-Selected-Value-Second-Third-Fourth-etc-values/m-p/1141595#M904595</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-06-29T16:14:14Z</dc:date>
    </item>
  </channel>
</rss>

