<?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: expression in edit script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/expression-in-edit-script/m-p/303263#M112188</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ikallioniemi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i count number of fails and pass in the each Lenskey.&lt;/P&gt;&lt;P&gt;If Pass or Fail is not available for particular LensKey, then it should display 0.&lt;/P&gt;&lt;P&gt;I need to place below to [Status EdgeChips], below code you provided for placing the 'Fail' or 'Pass'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left Join (Summarized)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD&amp;nbsp; LensKey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COUNT(CountDefectEdgeChip) as EdgeChipCountPerLens,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; if(max([Status EdgeChips1])=2,'Fail',if(max([Status EdgeChips1])=1,'Pass','NA')) as [Status EdgeChips],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//Here i need to place line for PassEdgeChips,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//Here i need to place line for &lt;/STRONG&gt;&lt;STRONG&gt;FailEdgeChips&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resident Summarized&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Group by LensKey;&lt;/P&gt;&lt;P&gt;Ex1 &lt;/P&gt;&lt;P&gt;LensKey, DefectStatus&lt;/P&gt;&lt;P&gt;1, Fail&lt;/P&gt;&lt;P&gt;1,Pass&lt;/P&gt;&lt;P&gt;1,-&lt;/P&gt;&lt;P&gt;For this ex1 , the result should be PassEdgeChips=1, FailEdgeChips=1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex2:&lt;/P&gt;&lt;P&gt;LensKey, DefectStatus&lt;/P&gt;&lt;P&gt;2, Pass&lt;/P&gt;&lt;P&gt;2,Pass&lt;/P&gt;&lt;P&gt;2,-&lt;/P&gt;&lt;P&gt;For this ex2 , the result should be PassEdgeChips=2, FailEdgeChips=0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex3&lt;/P&gt;&lt;P&gt;LensKey, DefectStatus&lt;/P&gt;&lt;P&gt;3,Fail&lt;/P&gt;&lt;P&gt;3,Fail&lt;/P&gt;&lt;P&gt;3,Fail&lt;/P&gt;&lt;P&gt;For this ex3 , the result should be PassEdgeChips=0, FailEdgeChips=3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex4&lt;/P&gt;&lt;P&gt;LensKey, DefectStatus&lt;/P&gt;&lt;P&gt;4,-&lt;/P&gt;&lt;P&gt;4,-&lt;/P&gt;&lt;P&gt;4,-&lt;/P&gt;&lt;P&gt;For this ex4 , the result should be PassEdgeChips=0, FailEdgeChips=0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i work on this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 27 Aug 2011 11:37:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-08-27T11:37:11Z</dc:date>
    <item>
      <title>expression in edit script</title>
      <link>https://community.qlik.com/t5/QlikView/expression-in-edit-script/m-p/303259#M112184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to achieve is " if any one 'Fail' occurs in an LensKey then the StatusField should be 'FAIL' "&amp;nbsp;&amp;nbsp; and also see the attached script document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I Used below line in edit script, it is not getting the correct result . Can you suggest the correct solution to get this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(sum([Status EdgeChips1])&amp;gt;=3,'Fail',if(sum([Status EdgeChips1])&amp;gt;=1,'Pass','NA')) as [Status EdgeChips]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The below is the sample example.&lt;/P&gt;&lt;P&gt;Ex1 &lt;/P&gt;&lt;P&gt;LensKey, DefectStatus&lt;/P&gt;&lt;P&gt;1, Fail&lt;/P&gt;&lt;P&gt;1,Pass&lt;/P&gt;&lt;P&gt;1,-&lt;/P&gt;&lt;P&gt;For this ex1 , the result should be = Fail&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex2:&lt;/P&gt;&lt;P&gt;LensKey, DefectStatus&lt;/P&gt;&lt;P&gt;2, Pass&lt;/P&gt;&lt;P&gt;2,Pass&lt;/P&gt;&lt;P&gt;2,-&lt;/P&gt;&lt;P&gt;For this ex2 , the result should be = Pass&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex3&lt;/P&gt;&lt;P&gt;LensKey, DefectStatus&lt;/P&gt;&lt;P&gt;3,Fail&lt;/P&gt;&lt;P&gt;3,Fail&lt;/P&gt;&lt;P&gt;3,Fail&lt;/P&gt;&lt;P&gt;For this ex3 , the result should be = Fail&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex4&lt;/P&gt;&lt;P&gt;LensKey, DefectStatus&lt;/P&gt;&lt;P&gt;4,-&lt;/P&gt;&lt;P&gt;4,-&lt;/P&gt;&lt;P&gt;4,-&lt;/P&gt;&lt;P&gt;For this ex4 , the result should be = NotAvailable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2011 08:50:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-in-edit-script/m-p/303259#M112184</guid>
      <dc:creator />
      <dc:date>2011-08-26T08:50:06Z</dc:date>
    </item>
    <item>
      <title>expression in edit script</title>
      <link>https://community.qlik.com/t5/QlikView/expression-in-edit-script/m-p/303260#M112185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; How about assigning a number to each type so that&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;LensKey,&lt;/P&gt;&lt;P&gt;DefectStatus,&lt;/P&gt;&lt;P&gt;If(DefectStatus='Fail',5,If(DefectStatus='Pass,1,0)) as DefectValue&lt;/P&gt;&lt;P&gt;1 as Rec_Count&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then in the display you can put logic in which says&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(sum(DefectValue&amp;gt;3,'Fail','Pass')&amp;nbsp; as DisplayValue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or if more than three records then&lt;/P&gt;&lt;P&gt;If(Sum(DefectValue)/sum(Rec_Count)&amp;gt;1'Fail','Pass')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2011 09:14:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-in-edit-script/m-p/303260#M112185</guid>
      <dc:creator />
      <dc:date>2011-08-26T09:14:56Z</dc:date>
    </item>
    <item>
      <title>expression in edit script</title>
      <link>https://community.qlik.com/t5/QlikView/expression-in-edit-script/m-p/303261#M112186</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;have you tried &lt;STRONG&gt;max&lt;/STRONG&gt;-function?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; left Join (Summarized)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD&amp;nbsp; LensKey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COUNT(CountDefectEdgeChip) as EdgeChipCountPerLens,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; if(max([Status EdgeChips1])=2,'Fail',if(max([Status EdgeChips1])=1,'Pass','NA')) as [Status EdgeChips]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resident Summarized&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Group by LensKey;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Lasse&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2011 11:41:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-in-edit-script/m-p/303261#M112186</guid>
      <dc:creator>lkallioniemi</dc:creator>
      <dc:date>2011-08-26T11:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: expression in edit script</title>
      <link>https://community.qlik.com/t5/QlikView/expression-in-edit-script/m-p/303262#M112187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ikallioniemi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks you very much, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It was awesome, and works fine in my application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2011 12:42:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-in-edit-script/m-p/303262#M112187</guid>
      <dc:creator />
      <dc:date>2011-08-26T12:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: expression in edit script</title>
      <link>https://community.qlik.com/t5/QlikView/expression-in-edit-script/m-p/303263#M112188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ikallioniemi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i count number of fails and pass in the each Lenskey.&lt;/P&gt;&lt;P&gt;If Pass or Fail is not available for particular LensKey, then it should display 0.&lt;/P&gt;&lt;P&gt;I need to place below to [Status EdgeChips], below code you provided for placing the 'Fail' or 'Pass'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left Join (Summarized)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD&amp;nbsp; LensKey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COUNT(CountDefectEdgeChip) as EdgeChipCountPerLens,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; if(max([Status EdgeChips1])=2,'Fail',if(max([Status EdgeChips1])=1,'Pass','NA')) as [Status EdgeChips],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//Here i need to place line for PassEdgeChips,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//Here i need to place line for &lt;/STRONG&gt;&lt;STRONG&gt;FailEdgeChips&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resident Summarized&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Group by LensKey;&lt;/P&gt;&lt;P&gt;Ex1 &lt;/P&gt;&lt;P&gt;LensKey, DefectStatus&lt;/P&gt;&lt;P&gt;1, Fail&lt;/P&gt;&lt;P&gt;1,Pass&lt;/P&gt;&lt;P&gt;1,-&lt;/P&gt;&lt;P&gt;For this ex1 , the result should be PassEdgeChips=1, FailEdgeChips=1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex2:&lt;/P&gt;&lt;P&gt;LensKey, DefectStatus&lt;/P&gt;&lt;P&gt;2, Pass&lt;/P&gt;&lt;P&gt;2,Pass&lt;/P&gt;&lt;P&gt;2,-&lt;/P&gt;&lt;P&gt;For this ex2 , the result should be PassEdgeChips=2, FailEdgeChips=0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex3&lt;/P&gt;&lt;P&gt;LensKey, DefectStatus&lt;/P&gt;&lt;P&gt;3,Fail&lt;/P&gt;&lt;P&gt;3,Fail&lt;/P&gt;&lt;P&gt;3,Fail&lt;/P&gt;&lt;P&gt;For this ex3 , the result should be PassEdgeChips=0, FailEdgeChips=3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex4&lt;/P&gt;&lt;P&gt;LensKey, DefectStatus&lt;/P&gt;&lt;P&gt;4,-&lt;/P&gt;&lt;P&gt;4,-&lt;/P&gt;&lt;P&gt;4,-&lt;/P&gt;&lt;P&gt;For this ex4 , the result should be PassEdgeChips=0, FailEdgeChips=0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i work on this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Aug 2011 11:37:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-in-edit-script/m-p/303263#M112188</guid>
      <dc:creator />
      <dc:date>2011-08-27T11:37:11Z</dc:date>
    </item>
    <item>
      <title>expression in edit script</title>
      <link>https://community.qlik.com/t5/QlikView/expression-in-edit-script/m-p/303264#M112189</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;this should do the trick:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Sum(&lt;/STRONG&gt;&lt;STRONG style="font-size: 12px;"&gt;if([Status EdgeChips1]=2,1,0))= as&amp;nbsp; FailEdgeChips,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(&lt;STRONG style="font-size: 12px;"&gt;if([Status EdgeChips1]=1,1,0))= as PassEdgeChips,&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px;"&gt;&lt;STRONG style="font-size: 12px;"&gt;BR&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="font-size: 12px;"&gt;&lt;STRONG style="font-size: 12px;"&gt;Lasse&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;STRONG style="font-size: 12px;"&gt;&lt;STRONG style="font-size: 12px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 07:26:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-in-edit-script/m-p/303264#M112189</guid>
      <dc:creator>lkallioniemi</dc:creator>
      <dc:date>2011-08-31T07:26:07Z</dc:date>
    </item>
  </channel>
</rss>

