<?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: Autonumber Function on Date Field is not returning required valu in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Autonumber-Function-on-Date-Field-is-not-returning-required-valu/m-p/1670922#M50720</link>
    <description>&lt;P&gt;&amp;nbsp;Yes in my data based on load order it was not consistent.&lt;/P&gt;&lt;P&gt;Hence I applied order by clause on my date field, then applied auto number.&lt;/P&gt;&lt;P&gt;Which fixed the issue&lt;/P&gt;</description>
    <pubDate>Thu, 30 Jan 2020 13:48:41 GMT</pubDate>
    <dc:creator>Ron1</dc:creator>
    <dc:date>2020-01-30T13:48:41Z</dc:date>
    <item>
      <title>Autonumber Function on Date Field is not returning required valu</title>
      <link>https://community.qlik.com/t5/App-Development/Autonumber-Function-on-Date-Field-is-not-returning-required-valu/m-p/1670117#M50630</link>
      <description>&lt;P&gt;I am facing a very strange issue and I am unable to find a solution for the same.&lt;/P&gt;&lt;P&gt;Your help will be highly appreciated&lt;/P&gt;&lt;P&gt;I am using auto function on my date field. However during year transition it is not showing consistency.Please help me to fix this.&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;TD&gt;Autonumber&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;05.12.2019&lt;/TD&gt;&lt;TD&gt;31&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12.12.2019&lt;/TD&gt;&lt;TD&gt;32&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;19.12.2019&lt;/TD&gt;&lt;TD&gt;33&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;26.12.2019&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;35&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;02.01.2020&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;34&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;You cal also refer the attached screenshot&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 28 Jan 2020 15:29:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Autonumber-Function-on-Date-Field-is-not-returning-required-valu/m-p/1670117#M50630</guid>
      <dc:creator>Ron1</dc:creator>
      <dc:date>2020-01-28T15:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Autonumber Function on Date Field is not returning required valu</title>
      <link>https://community.qlik.com/t5/App-Development/Autonumber-Function-on-Date-Field-is-not-returning-required-valu/m-p/1670149#M50635</link>
      <description>&lt;P&gt;Autonumber will assign numbers based on the order that it reads data each time.&amp;nbsp; You have to read in your dates as date values and then order by that date value.&amp;nbsp; In the code below Table1 has your base data (in the wrong order on purpose) and assigns the "wrong" number.&amp;nbsp; Table2 orders by the date field (that is brought in as text) and gives the "wrong" result.&amp;nbsp; Table3 is what you want as the value is converted using date#() and then ordered by that field.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table1:
LOAD DateValue, FormattedDate, AutoNumber(DateValue,'Table1DateValue') as AutonumberOfDateValue, AutoNumber(FormattedDate,'Table1FormattedDate') as AutonumberOfFormattedDate;
load DateValue, Date#(DateValue,'dd.mm.yyyy') as FormattedDate inline [
DateValue
05.12.2019
12.12.2019
19.12.2019
02.01.2020
26.12.2019
];


NoConcatenate
Table2:
LOAD DateValue as OrderedDateValueByText, FormattedDate as OrderedFormattedDateByText, AutoNumber(DateValue,'Table2DateValue') as OrderedAutonumberOfDateValueByText, AutoNumber(FormattedDate,'Table2FormattedDate') as OrderedAutonumberOfFormattedDateByText
Resident Table1
ORDER BY DateValue;




NoConcatenate
Table3:
LOAD DateValue as OrderedDateValueByDate, FormattedDate as OrderedFormattedDateByDate, AutoNumber(DateValue,'Table3DateValue') as OrderedAutonumberOfDateValueByDate, AutoNumber(FormattedDate,'Table3FormattedDate') as OrderedAutonumberOfFormattedDateByDate
Resident Table1
ORDER BY FormattedDate;
&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 28 Jan 2020 16:33:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Autonumber-Function-on-Date-Field-is-not-returning-required-valu/m-p/1670149#M50635</guid>
      <dc:creator>andoryuu</dc:creator>
      <dc:date>2020-01-28T16:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: Autonumber Function on Date Field is not returning required valu</title>
      <link>https://community.qlik.com/t5/App-Development/Autonumber-Function-on-Date-Field-is-not-returning-required-valu/m-p/1670922#M50720</link>
      <description>&lt;P&gt;&amp;nbsp;Yes in my data based on load order it was not consistent.&lt;/P&gt;&lt;P&gt;Hence I applied order by clause on my date field, then applied auto number.&lt;/P&gt;&lt;P&gt;Which fixed the issue&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 13:48:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Autonumber-Function-on-Date-Field-is-not-returning-required-valu/m-p/1670922#M50720</guid>
      <dc:creator>Ron1</dc:creator>
      <dc:date>2020-01-30T13:48:41Z</dc:date>
    </item>
  </channel>
</rss>

