<?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 Zeitraum aufteilen in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Zeitraum-aufteilen/m-p/178010#M45366</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hallo,&lt;/P&gt;&lt;P&gt;ich habe viele Datensätze die einen Zahlungszeitraum dokumentieren.&lt;/P&gt;&lt;P&gt;z.B. 13.04.2010 bis 05.06.2010&lt;/P&gt;&lt;P&gt;Diesen Zeitraum möchte ich in die jeweiligen Monate aufteilen und dazu die jeweiligen Tage ermitteln.&lt;/P&gt;&lt;P&gt;04.2010 = 18 Tage&lt;/P&gt;&lt;P&gt;05.2010 = 31 Tage&lt;/P&gt;&lt;P&gt;06.2010 = 5 Tage&lt;/P&gt;&lt;P&gt;Hat jemand eine Idee wie ich das bewerkstelligen kann ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Aug 2010 12:59:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-08-27T12:59:08Z</dc:date>
    <item>
      <title>Zeitraum aufteilen</title>
      <link>https://community.qlik.com/t5/QlikView/Zeitraum-aufteilen/m-p/178010#M45366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hallo,&lt;/P&gt;&lt;P&gt;ich habe viele Datensätze die einen Zahlungszeitraum dokumentieren.&lt;/P&gt;&lt;P&gt;z.B. 13.04.2010 bis 05.06.2010&lt;/P&gt;&lt;P&gt;Diesen Zeitraum möchte ich in die jeweiligen Monate aufteilen und dazu die jeweiligen Tage ermitteln.&lt;/P&gt;&lt;P&gt;04.2010 = 18 Tage&lt;/P&gt;&lt;P&gt;05.2010 = 31 Tage&lt;/P&gt;&lt;P&gt;06.2010 = 5 Tage&lt;/P&gt;&lt;P&gt;Hat jemand eine Idee wie ich das bewerkstelligen kann ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Aug 2010 12:59:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Zeitraum-aufteilen/m-p/178010#M45366</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-08-27T12:59:08Z</dc:date>
    </item>
    <item>
      <title>Zeitraum aufteilen</title>
      <link>https://community.qlik.com/t5/QlikView/Zeitraum-aufteilen/m-p/178011#M45367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wenn die Frage in englisch gestellt wird ist die Antwortfrequenz höher und schneller &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Schau mal ob das Beispiel anbei passt, Feedback erwünscht &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Ist etwas länger, aber damit deckt es auch Zeiträume über Jahresgrenzen hinweg sauber ab. GEht bestimmt noch etwas eleganter, aber denke so passt es erstmal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Grüße&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tab1:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; Key, DatVon, DatBis&lt;BR /&gt; 1, 15.04.2010, 05.06.2010&lt;BR /&gt; 2, 12.03.2010, 15.03.2010&lt;BR /&gt; 3, 12.10.2008, 11.02.2010&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;new:&lt;BR /&gt;load&lt;BR /&gt; Key&lt;BR /&gt;, DatVon&lt;BR /&gt;, DatBis&lt;BR /&gt;, IF(TEXT(DATE(DatVon,'YYYYMM')) = TEXT(DATE(DatBis,'YYYYMM')), DatBis-DatVon+1, // If Both date within the same Month calc diff between days, plus +1 becaus if DatVon equal DatBis amount should be 1 day&lt;BR /&gt; IF(Iterno()=1, MONTHSEND(1, DatVon) - DatVon, // Cause Both Dates within different Months, for DatVon calc days till as diff to End of month&lt;BR /&gt; IF(TEXT(DATE(ADDMONTHS(DatVon, iterno() -1, 1), 'YYYYMM')) = TEXT(DATE(DatBis,'YYYYMM')), DAY(DatBis), // If last Month just take day of DatBis as amount of days&lt;BR /&gt; DAY(MONTHSEND(1, ADDMONTHS(DatVon, iterno() -1, 1)))&lt;BR /&gt; )&lt;BR /&gt; )&lt;BR /&gt; ) AS AnzahlTage&lt;BR /&gt;&lt;BR /&gt;, DATE(ADDMonths(DatVon, iterno() -1, 1), 'MMYYYY') AS MonatJahr&lt;BR /&gt;RESIDENT&lt;BR /&gt;tab1&lt;BR /&gt;WHILE TEXT(DATE(ADDMONTHS(DatVon, iterno() -1, 1), 'YYYYMM')) &amp;lt;= TEXT(DATE(DatBis,'YYYYMM'))&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;DROP TABLE tab1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Aug 2010 21:51:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Zeitraum-aufteilen/m-p/178011#M45367</guid>
      <dc:creator />
      <dc:date>2010-08-27T21:51:22Z</dc:date>
    </item>
    <item>
      <title>Zeitraum aufteilen</title>
      <link>https://community.qlik.com/t5/QlikView/Zeitraum-aufteilen/m-p/178012#M45368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vielen Dank für die Super Antwort. Ging doch schnell.&lt;/P&gt;&lt;P&gt;Dein Skript funktioniert sehr gut. Leider nicht auf unserem DWH. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Bin ein absoluter Newbie. Hier mein abgewandeltes Skript (es kommt die Meldung: fehlerhafte Syntax):&lt;/P&gt;&lt;P style="font-style: italic"&gt;&lt;/P&gt;&lt;P style="font-style: italic"&gt;new_TEMP:&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;SQL&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"id_leistungen",&lt;/P&gt;&lt;P&gt;zahlbis,&lt;/P&gt;&lt;P&gt;zahlvon&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;FROM&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;I&gt;&lt;/I&gt;&lt;P style="font-style: italic"&gt;new:&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;load&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;zahlbis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;zahlvon&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;IF(TEXT(DATE(zahlvon,'YYYYMM')) = TEXT(DATE(zahlbis,'YYYYMM')), zahlbis-zahlvon+1, &lt;B&gt;// If Both date within the same Month calc diff between days, plus +1 becaus if DatVon equal DatBis amount should be 1 day&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF(Iterno()=1, MONTHSEND(1, zahlvon) - zahlvon, &lt;B&gt;// Cause Both Dates within different Months, for DatVon calc days till as diff to End of month&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF(TEXT(DATE(ADDMONTHS(zahlvon, iterno() -1, 1), 'YYYYMM')) = TEXT(DATE(zahlbis,'YYYYMM')), DAY(zahlbis), &lt;B&gt;// If last Month just take day of DatBis as amount of days&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DAY(MONTHSEND(1, ADDMONTHS(zahlvon, iterno() -1, 1)))&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;B&gt;AS&lt;/B&gt; AnzahlTage&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;DATE(ADDMonths(zahlvon, iterno() -1, 1), 'MMYYYY') &lt;B&gt;AS&lt;/B&gt; MonatJahr&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;RESIDENT&lt;/P&gt;&lt;P&gt;new_TEMP:&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;WHILE&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;DROP&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;B&gt;TABLE&lt;/B&gt; &lt;P&gt;&lt;I&gt;new_TEMP;&lt;/I&gt;&lt;/P&gt;TEXT(DATE(ADDMONTHS(zahlvon, iterno() -1, 1), 'YYYYMM')) &amp;lt;= TEXT(DATE(zahlbis,'YYYYMM'))&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; "id_leistungen", DWH.dwh.zahlungen; &lt;B&gt;SELECT&lt;/B&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gruß&lt;/P&gt;&lt;P&gt;Dirk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Aug 2010 08:40:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Zeitraum-aufteilen/m-p/178012#M45368</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-08-30T08:40:24Z</dc:date>
    </item>
    <item>
      <title>Zeitraum aufteilen</title>
      <link>https://community.qlik.com/t5/QlikView/Zeitraum-aufteilen/m-p/178013#M45369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;oh, was war das für ein Quatsch, hier nochmal:&lt;/P&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;/P&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;new_TEMP:&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;B&gt;SQL&lt;/B&gt; &lt;B&gt;SELECT&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;"id_leistungen",&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;zahlbis,&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;zahlvon&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;B&gt;FROM&lt;/B&gt; DWH.dwh.zahlungen;&lt;/P&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;new:&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;B&gt;load&lt;/B&gt; "id_leistungen",&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;zahlbis,&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;zahlvon&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;, IF(TEXT(DATE(zahlvon,'YYYYMM')) = TEXT(DATE(zahlbis,'YYYYMM')), zahlbis-zahlvon+1, &lt;B&gt;// If Both date within the same Month calc diff between days, plus +1 becaus if DatVon equal DatBis amount should be 1 day&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;IF(Iterno()=1, MONTHSEND(1, zahlvon) - zahlvon, &lt;B&gt;// Cause Both Dates within different Months, for DatVon calc days till as diff to End of month&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;IF(TEXT(DATE(ADDMONTHS(zahlvon, iterno() -1, 1), 'YYYYMM')) = TEXT(DATE(zahlbis,'YYYYMM')), DAY(zahlbis), &lt;B&gt;// If last Month just take day of DatBis as amount of days&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;DAY(MONTHSEND(1, ADDMONTHS(zahlvon, iterno() -1, 1)))&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;)&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;)&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;) &lt;B&gt;AS&lt;/B&gt; AnzahlTage&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;, DATE(ADDMonths(zahlvon, iterno() -1, 1), 'MMYYYY') &lt;B&gt;AS&lt;/B&gt; MonatJahr&lt;/P&gt;&lt;P style="font-weight: bold; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;RESIDENT&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;new_TEMP:&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;B&gt;WHILE&lt;/B&gt; TEXT(DATE(ADDMONTHS(zahlvon, iterno() -1, 1), 'YYYYMM')) &amp;lt;= TEXT(DATE(zahlbis,'YYYYMM'))&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;B&gt;DROP&lt;/B&gt; &lt;B&gt;TABLE&lt;/B&gt; &lt;I&gt;new_TEMP;&lt;/I&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Aug 2010 08:42:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Zeitraum-aufteilen/m-p/178013#M45369</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-08-30T08:42:59Z</dc:date>
    </item>
    <item>
      <title>Zeitraum aufteilen</title>
      <link>https://community.qlik.com/t5/QlikView/Zeitraum-aufteilen/m-p/178014#M45370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ich habs:&lt;/P&gt;&lt;P&gt;hinter&lt;/P&gt;&lt;P&gt;RESIDENT new_TEMP war ein : zu viel, der musste weg und es funktioniert !&lt;/P&gt;&lt;P&gt;Danke an Michael.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Aug 2010 09:54:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Zeitraum-aufteilen/m-p/178014#M45370</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-08-30T09:54:12Z</dc:date>
    </item>
  </channel>
</rss>

