<?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: Need help in scripting in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-help-in-scripting/m-p/1654487#M456086</link>
    <description>&lt;P&gt;that should work:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SET DateFormat='DD-MM-YYYY';
SET TimestampFormat='DD-MM-YYYY hh:mm:ss[.fff]';
LET vValidFrom = date('01-09-2019');

SOURCE:
Load *, if(date(VF) &amp;gt;= '$(vValidFrom)', 1,0) as Flag
;
LOAD MC, 
     VC, 
     PC, 
     max(VF) as VF
FROM [C:\tmp\TEST.xlsx] (ooxml, embedded labels, table is Sheet1)
GROUP BY MC, VC, PC;

drop field VF from SOURCE;

left join 
load MC, 
     VC, 
     PC, 
     VF
FROM [C:\tmp\TEST.xlsx] (ooxml, embedded labels, table is Sheet1);&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 05 Dec 2019 10:07:37 GMT</pubDate>
    <dc:creator>zhadrakas</dc:creator>
    <dc:date>2019-12-05T10:07:37Z</dc:date>
    <item>
      <title>Need help in scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-scripting/m-p/1654448#M456085</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;Need a help in creating a &lt;STRONG&gt;Flag column&lt;/STRONG&gt; at script with values 1,0.&lt;/P&gt;&lt;P&gt;If for a combination of MC,VC,PC if VF is &amp;gt;= 01-09-2019(DD-MM-YYYY),&lt;/P&gt;&lt;P&gt;then flag 1 should be assign else 0.&lt;/P&gt;&lt;P&gt;For example the first row in the below table should get flag 0 because valid from is not &amp;gt;= 01-09-2019&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Output required&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/24967i379FEC380C059ACC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Please find the sample data attachment and required output pic&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 08:43:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-scripting/m-p/1654448#M456085</guid>
      <dc:creator>kunkumnaveen</dc:creator>
      <dc:date>2019-12-05T08:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-scripting/m-p/1654487#M456086</link>
      <description>&lt;P&gt;that should work:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SET DateFormat='DD-MM-YYYY';
SET TimestampFormat='DD-MM-YYYY hh:mm:ss[.fff]';
LET vValidFrom = date('01-09-2019');

SOURCE:
Load *, if(date(VF) &amp;gt;= '$(vValidFrom)', 1,0) as Flag
;
LOAD MC, 
     VC, 
     PC, 
     max(VF) as VF
FROM [C:\tmp\TEST.xlsx] (ooxml, embedded labels, table is Sheet1)
GROUP BY MC, VC, PC;

drop field VF from SOURCE;

left join 
load MC, 
     VC, 
     PC, 
     VF
FROM [C:\tmp\TEST.xlsx] (ooxml, embedded labels, table is Sheet1);&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 05 Dec 2019 10:07:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-scripting/m-p/1654487#M456086</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2019-12-05T10:07:37Z</dc:date>
    </item>
  </channel>
</rss>

