<?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: replace expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/replace-expression/m-p/818980#M1040633</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any inputs on this..please&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Dec 2014 08:09:19 GMT</pubDate>
    <dc:creator>bharath28</dc:creator>
    <dc:date>2014-12-12T08:09:19Z</dc:date>
    <item>
      <title>replace expression</title>
      <link>https://community.qlik.com/t5/QlikView/replace-expression/m-p/818979#M1040632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of writing the if() condition in the front end, I want to write a sql statement in qlikview script to fetch the "fielda" with right data and use it directly in front end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(count(fielda)&amp;gt;1 ,minString({&amp;lt;type={'isp'}&amp;gt;}fielda), if(count (fielda)=1, minString(fielda), 'N'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression counts the fielda values, if it has greater than 1 value then it pulls only values where type=isp,&lt;/P&gt;&lt;P&gt;if fielda has only 1 value then returns it, otherwise returns 'N'.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I wrote the below script which satisfies the first if condition, but not the 2nd if(). Please help me with the where condition or some technique where i can fetch the right data that above expression does.&lt;/P&gt;&lt;P&gt;Table:&lt;BR /&gt;load&lt;BR /&gt;id&lt;BR /&gt;field1;&lt;/P&gt;&lt;P&gt;sql select&lt;BR /&gt;id,&lt;BR /&gt;field1&lt;BR /&gt;from database&lt;BR /&gt;where type=isp ...??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2014 20:36:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/replace-expression/m-p/818979#M1040632</guid>
      <dc:creator>bharath28</dc:creator>
      <dc:date>2014-12-11T20:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: replace expression</title>
      <link>https://community.qlik.com/t5/QlikView/replace-expression/m-p/818980#M1040633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any inputs on this..please&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2014 08:09:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/replace-expression/m-p/818980#M1040633</guid>
      <dc:creator>bharath28</dc:creator>
      <dc:date>2014-12-12T08:09:19Z</dc:date>
    </item>
  </channel>
</rss>

