<?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: Find difference between 2 values across a certain date range in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Find-difference-between-2-values-across-a-certain-date-range/m-p/2163107#M1225179</link>
    <description>&lt;P&gt;Try something like this,&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;tab1:
CrossTable(Month, Grade)
LOAD * INLINE [
    ID, 1/1/23, 2/1/23, 3/1/23, 4/1/23, 5/1/23, 6/1/23, 7/1/23, 8/1/23
    1000, , , A, B, Pass, , , 
    1001, , , , , , , D, 
    1002, , , , , , D, , A
    1003, A, B, B, , , , , 
];

Left Join(tab1)
LOAD ID, Concat(If(Not Len(Trim(Grade))=0,Grade&amp;amp;'@'),'',Date#(Month)) As C1
Resident tab1
Group By ID;

Left Join(tab1)
LOAD ID, SubField(C1,'@',-3) &amp;amp;'-&amp;gt;'&amp;amp; SubField(C1,'@',-2) As Rationale,
	If(SubField(C1,'@',-2) &amp;gt; If(SubField(C1,'@',-3)='Pass','Z',SubField(C1,'@',-3)), 'Deteriorate',
		If(SubField(C1,'@',-2) &amp;lt; SubField(C1,'@',-3), 'Improve',
			'n/a')) As Result	
Resident tab1;&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="commqv006.png" style="width: 182px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/127367iD96D2E41DB778156/image-size/large?v=v2&amp;amp;px=999" role="button" title="commqv006.png" alt="commqv006.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jan 2024 02:44:05 GMT</pubDate>
    <dc:creator>Saravanan_Desingh</dc:creator>
    <dc:date>2024-01-19T02:44:05Z</dc:date>
    <item>
      <title>Find difference between 2 values across a certain date range</title>
      <link>https://community.qlik.com/t5/QlikView/Find-difference-between-2-values-across-a-certain-date-range/m-p/2162790#M1225173</link>
      <description>&lt;P&gt;Hi, I need help on the below.&lt;/P&gt;
&lt;P&gt;I have grades of some students and need to know if they improved on the results based on the latest 2 tests. (i.e. I need the result tab in yellow).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-01-18 193911.png" style="width: 732px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/127282i151CB390BE1AF9A0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-01-18 193911.png" alt="Screenshot 2024-01-18 193911.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I am on QlikView and appreciate your assistance. Many thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 11:42:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-difference-between-2-values-across-a-certain-date-range/m-p/2162790#M1225173</guid>
      <dc:creator>NewbieToQV</dc:creator>
      <dc:date>2024-01-18T11:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: Find difference between 2 values across a certain date range</title>
      <link>https://community.qlik.com/t5/QlikView/Find-difference-between-2-values-across-a-certain-date-range/m-p/2163035#M1225177</link>
      <description>&lt;P&gt;What does you data table look like when loaded into QV? Can you post a screenshot of the table model?&lt;/P&gt;
&lt;P&gt;-Rob&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 20:32:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-difference-between-2-values-across-a-certain-date-range/m-p/2163035#M1225177</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2024-01-18T20:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Find difference between 2 values across a certain date range</title>
      <link>https://community.qlik.com/t5/QlikView/Find-difference-between-2-values-across-a-certain-date-range/m-p/2163107#M1225179</link>
      <description>&lt;P&gt;Try something like this,&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;tab1:
CrossTable(Month, Grade)
LOAD * INLINE [
    ID, 1/1/23, 2/1/23, 3/1/23, 4/1/23, 5/1/23, 6/1/23, 7/1/23, 8/1/23
    1000, , , A, B, Pass, , , 
    1001, , , , , , , D, 
    1002, , , , , , D, , A
    1003, A, B, B, , , , , 
];

Left Join(tab1)
LOAD ID, Concat(If(Not Len(Trim(Grade))=0,Grade&amp;amp;'@'),'',Date#(Month)) As C1
Resident tab1
Group By ID;

Left Join(tab1)
LOAD ID, SubField(C1,'@',-3) &amp;amp;'-&amp;gt;'&amp;amp; SubField(C1,'@',-2) As Rationale,
	If(SubField(C1,'@',-2) &amp;gt; If(SubField(C1,'@',-3)='Pass','Z',SubField(C1,'@',-3)), 'Deteriorate',
		If(SubField(C1,'@',-2) &amp;lt; SubField(C1,'@',-3), 'Improve',
			'n/a')) As Result	
Resident tab1;&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="commqv006.png" style="width: 182px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/127367iD96D2E41DB778156/image-size/large?v=v2&amp;amp;px=999" role="button" title="commqv006.png" alt="commqv006.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 02:44:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-difference-between-2-values-across-a-certain-date-range/m-p/2163107#M1225179</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2024-01-19T02:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Find difference between 2 values across a certain date range</title>
      <link>https://community.qlik.com/t5/QlikView/Find-difference-between-2-values-across-a-certain-date-range/m-p/2163117#M1225180</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;I don't have access to the script. Any solution to do at the chart/table properties?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 04:26:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-difference-between-2-values-across-a-certain-date-range/m-p/2163117#M1225180</guid>
      <dc:creator>NewbieToQV</dc:creator>
      <dc:date>2024-01-19T04:26:56Z</dc:date>
    </item>
  </channel>
</rss>

