<?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: Month Diff between max fromdate and min todate in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Month-Diff-between-max-fromdate-and-min-todate/m-p/1639409#M732106</link>
    <description>&lt;P&gt;How you want the output to look like?, please paste required output in next column.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Oct 2019 10:17:52 GMT</pubDate>
    <dc:creator>ankitbisht01</dc:creator>
    <dc:date>2019-10-24T10:17:52Z</dc:date>
    <item>
      <title>Month Diff between max fromdate and min todate</title>
      <link>https://community.qlik.com/t5/QlikView/Month-Diff-between-max-fromdate-and-min-todate/m-p/1639388#M732105</link>
      <description>&lt;P&gt;From below data i want to get month difference between whatever the minimum date is in fromdate and whatever the&amp;nbsp; last&amp;nbsp; max date in todate.. how i get that . .&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;POLIYNO	From Date   To Date	 
				
114371	21-05-2019   30-06-2019	   
114371	03-04-2019   30-06-2019	
114371	08-12-2018   30-06-2019	
114371	01-07-2019   31-12-2019	&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:07:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Month-Diff-between-max-fromdate-and-min-todate/m-p/1639388#M732105</guid>
      <dc:creator>capriconuser</dc:creator>
      <dc:date>2024-11-16T02:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Month Diff between max fromdate and min todate</title>
      <link>https://community.qlik.com/t5/QlikView/Month-Diff-between-max-fromdate-and-min-todate/m-p/1639409#M732106</link>
      <description>&lt;P&gt;How you want the output to look like?, please paste required output in next column.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 10:17:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Month-Diff-between-max-fromdate-and-min-todate/m-p/1639409#M732106</guid>
      <dc:creator>ankitbisht01</dc:creator>
      <dc:date>2019-10-24T10:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: Month Diff between max fromdate and min todate</title>
      <link>https://community.qlik.com/t5/QlikView/Month-Diff-between-max-fromdate-and-min-todate/m-p/1639412#M732107</link>
      <description>&lt;LI-CODE lang="markup"&gt;POLICYNO	From Date	To Date	   Month_Difference
						
CAR/114371	08-12-2018	30-06-2019	6
CAR/114371	03-04-2019	30-06-2019	2
CAR/114371	21-05-2019	30-06-2019	1
CAR/114371	01-07-2019	31-12-2019	11&lt;/LI-CODE&gt;&lt;P&gt;In last record 11 because from min date 8-12-2018 and max date 31-12-2019 total 11 months is the difference .. so i want that difference only in last record of each policy&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i tried this&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table:
LOAD POLICY_NO,        
     fromdate, 
     todate ,
      Num(fabs (
    ( (year( fromdate) * 12) + month( fromdate) ) 
  - ( ((year(todate) * 12) + month(todate)) ) 
)) as Month_Difference,
FROM temp_table.qvd (qvd);

table3:
NoConcatenate
LOAD *  
Resident Table
Order By fromdate,todate asc;

DROP Table Table;

left Join (table3)
LOAD POLICY_NO,
     Min(fromdate) as Min_Date,
     Max(todate) as Expiry_Max_Date   
Resident table3
Group By POLICY_NO;   
Store table3 into [C:\Users\HP\Desktop\test\table_3.qvd](qvd);
Drop Table table3;&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 24 Oct 2019 10:26:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Month-Diff-between-max-fromdate-and-min-todate/m-p/1639412#M732107</guid>
      <dc:creator>capriconuser</dc:creator>
      <dc:date>2019-10-24T10:26:19Z</dc:date>
    </item>
  </channel>
</rss>

