<?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 Max Date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Max-Date/m-p/269374#M101033</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Folks!&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Last Transaction]:&lt;BR /&gt;LOAD Only(%KEY_MAT_MATNR),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BEL_MATNR_K,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Max([Last Transaction])&lt;BR /&gt;Resident Documents Group By BEL_MATNR_K;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Wondering if someone can help me. &lt;/P&gt;&lt;P&gt;I create a table which contain about 8.000.000 lines.&lt;/P&gt;&lt;P&gt;If i want to show only the max data (last Transaction) for each Material (about 350.000) i used the script shown above. &lt;/P&gt;&lt;P&gt;My problem: i loose a lot of information . most of the materials are without a date, allthough there is a date in SAP. I only get about 60.000 materials with a date "Last Transaction". Every material has a transaction.&lt;/P&gt;&lt;P&gt;Can anyone tell me, where i've made tha mistake. &lt;/P&gt;&lt;P&gt;Thanks a lot for the help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Jun 2011 12:03:22 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-07T12:03:22Z</dc:date>
    <item>
      <title>Max Date</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Date/m-p/269374#M101033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Folks!&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Last Transaction]:&lt;BR /&gt;LOAD Only(%KEY_MAT_MATNR),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BEL_MATNR_K,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Max([Last Transaction])&lt;BR /&gt;Resident Documents Group By BEL_MATNR_K;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Wondering if someone can help me. &lt;/P&gt;&lt;P&gt;I create a table which contain about 8.000.000 lines.&lt;/P&gt;&lt;P&gt;If i want to show only the max data (last Transaction) for each Material (about 350.000) i used the script shown above. &lt;/P&gt;&lt;P&gt;My problem: i loose a lot of information . most of the materials are without a date, allthough there is a date in SAP. I only get about 60.000 materials with a date "Last Transaction". Every material has a transaction.&lt;/P&gt;&lt;P&gt;Can anyone tell me, where i've made tha mistake. &lt;/P&gt;&lt;P&gt;Thanks a lot for the help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2011 12:03:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Date/m-p/269374#M101033</guid>
      <dc:creator />
      <dc:date>2011-06-07T12:03:22Z</dc:date>
    </item>
    <item>
      <title>Max Date</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Date/m-p/269375#M101034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi CT,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where is the Date in your Table? I am unable to understand your question. which tables are you using in SAP. I guess you are using MSEG..&lt;/P&gt;&lt;P&gt;can you explain a bit more. If you can tell the tables, I can help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;sravan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2011 12:45:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Date/m-p/269375#M101034</guid>
      <dc:creator />
      <dc:date>2011-06-07T12:45:53Z</dc:date>
    </item>
    <item>
      <title>Max Date</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Date/m-p/269376#M101035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why do you use the function only()?&lt;/P&gt;&lt;P&gt;I think it should be: &lt;/P&gt;&lt;P&gt;[Last Transaction]:&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BEL_MATNR_K,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Max([Last Transaction])&lt;/P&gt;&lt;P&gt;Resident Documents Group By BEL_MATNR_K;&lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Last Transaction]:&lt;/P&gt;&lt;P&gt;LOAD KEY_MAT_MATNR,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BEL_MATNR_K,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Max([Last Transaction])&lt;/P&gt;&lt;P&gt;Resident Documents Group By BEL_MATNR_K, KEY_MAT_MATNR;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You also have to make sure that QlikView can interpret your Last Transaction as a date field (if it is a string, the max() function will not work properly and in this case, the value would be ignored) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2011 12:54:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Date/m-p/269376#M101035</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2011-06-07T12:54:19Z</dc:date>
    </item>
    <item>
      <title>Max Date</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Date/m-p/269377#M101036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hy Sravan!&lt;/P&gt;&lt;P&gt;I use the tables MKPF and MSEG from SAP. With these two table i created the table "Documents" in QV by using a join. So far everything is fine. &lt;/P&gt;&lt;P&gt;Now i need the date (MKPF-BUDAT) of the last transaction for each material (MSEG-MATNR).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2011 13:12:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Date/m-p/269377#M101036</guid>
      <dc:creator />
      <dc:date>2011-06-07T13:12:36Z</dc:date>
    </item>
    <item>
      <title>Max Date</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Date/m-p/269378#M101037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hy Erich!&lt;/P&gt;&lt;P&gt;I have replaced the only allready - my script looks like your suggestion - same result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2011 13:15:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Date/m-p/269378#M101037</guid>
      <dc:creator />
      <dc:date>2011-06-07T13:15:10Z</dc:date>
    </item>
    <item>
      <title>Max Date</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Date/m-p/269379#M101038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you check if Last Transaction is a date? &lt;/P&gt;&lt;P&gt;If it is a date, it's also a number, then you can use the Isnum( Last Transaction) to test it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will give you the wrong results, but only to check if it`s a date problem, you could replace the max(Last Trans.) by maxstring(Last Trans). It will consider everything as strings. If you have more results, then it`s a problem with dates. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2011 13:20:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Date/m-p/269379#M101038</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2011-06-07T13:20:51Z</dc:date>
    </item>
    <item>
      <title>Max Date</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Date/m-p/269380#M101039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;MSEG:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;Mid([Material doc], FindOneOf([Material doc], '123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTyUuVvWwXxYyZz')) as [Material doc],&lt;/P&gt;&lt;P&gt;Mid(Material_Key, FindOneOf(Material_Key, '123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTyUuVvWwXxYyZz')) as Material_Key,&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;SQL Select * from MSEG&lt;/P&gt;&lt;P&gt;where MJAHR&amp;gt;= 2011; // I guess you dont want all the data so reduce to 2011&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join (MSEG)&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mid(MBLNR, FindOneOf(MBLNR, '123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTyUuVvWwXxYyZz')) as [Material doc],&lt;/P&gt;&lt;P&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp; MJAHR as [Mat doc year], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(BUDAT) as [Posting date]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ; &lt;/P&gt;&lt;P&gt;SQL Select MBLNR MJAHR BUDAT&amp;nbsp; from MKPF&lt;/P&gt;&lt;P&gt;where MJAHR &amp;gt;= 2011&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Documents:&lt;/P&gt;&lt;P&gt;Noconcatenate&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt; [Material doc],&lt;/P&gt;&lt;P&gt;Material_Key&lt;/P&gt;&lt;P&gt;Max( [Posting date]) as [MaxPostingDate],&lt;/P&gt;&lt;P&gt;Resident MSEG&lt;/P&gt;&lt;P&gt;Group By [Material doc],Material_Key&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop table MSEG;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi christoph,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what you need I guess and some advices from myside&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The below formula is used to remove the zeroes before the MaterialNumber.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Mid([Material doc], FindOneOf([Material doc], '123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTyUuVvWwXxYyZz')) as [Material doc]&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sravan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2011 13:39:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Date/m-p/269380#M101039</guid>
      <dc:creator />
      <dc:date>2011-06-07T13:39:18Z</dc:date>
    </item>
  </channel>
</rss>

