<?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 Set Analysis Greater Than variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-Than-variable/m-p/175128#M43700</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is driving me crazy!&lt;/P&gt;&lt;P&gt;I have used the code above and it works perfectly.&lt;/P&gt;&lt;P&gt;I can make the selection in the field [Document Type] = REN and it shows the numbers I expect to see. I wanted to move the selection of document type in my set analysis so the user doesnt have to make that selection because they dont always know what they are looking for. When I add this to my set analysis the number is way different. What is wrong below?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Type = 'Renewals', count({$&amp;lt; &lt;STRONG&gt;[Document Type] = {"REN"},&lt;/STRONG&gt; [Days Prior to Renewal]={"&amp;lt;$(=min(SLA))"}&amp;gt;}Distinct [Item Number1]),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 05 Dec 2009 03:48:06 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-12-05T03:48:06Z</dc:date>
    <item>
      <title>Set Analysis Greater Than variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-Than-variable/m-p/175125#M43697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am try to do a simple set analysis and use greater than a variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;({$&amp;lt;[Days in GMRC] = {"&amp;gt; SLA"}&amp;gt;}Distinct [Policy Number])&lt;/P&gt;&lt;P&gt;[Days In GMRC] and SLA are both variables. I can get this to work if I put a hardcoded number where the variable SLA is but that is not dynamic enough for this to work in my case.&lt;/P&gt;&lt;P&gt;Here is the only greater than in the set analysis documentation.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;sum( {$&amp;lt;Year = {"&amp;gt;1978&amp;lt;2004"}&amp;gt;} Sales )&lt;BR /&gt;as above, but now with a numeric search so that an arbitrary range can be specified.&lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;I have tried single quotes no quotes and all other possibilitiesd I couold think of. Does anyone have a solution for this? I think it should be simple and I am just missing something.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2009 04:34:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-Than-variable/m-p/175125#M43697</guid>
      <dc:creator />
      <dc:date>2009-12-04T04:34:31Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Greater Than variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-Than-variable/m-p/175126#M43698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your greater than is spot on, it's your variable that is the problem.&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;({$&amp;lt;[Days in GMRC] = {"&amp;gt; $(SLA)"}&amp;gt;}Distinct [Policy Number])&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I'm actually surprised that Days in GMRC is a variable and that is working. I thought only fields were allowed there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2009 05:53:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-Than-variable/m-p/175126#M43698</guid>
      <dc:creator />
      <dc:date>2009-12-04T05:53:31Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Greater Than variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-Than-variable/m-p/175127#M43699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Days in GMRC is a field that I created in the script. Thanks, your reply did the trick.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2009 22:00:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-Than-variable/m-p/175127#M43699</guid>
      <dc:creator />
      <dc:date>2009-12-04T22:00:05Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Greater Than variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-Than-variable/m-p/175128#M43700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is driving me crazy!&lt;/P&gt;&lt;P&gt;I have used the code above and it works perfectly.&lt;/P&gt;&lt;P&gt;I can make the selection in the field [Document Type] = REN and it shows the numbers I expect to see. I wanted to move the selection of document type in my set analysis so the user doesnt have to make that selection because they dont always know what they are looking for. When I add this to my set analysis the number is way different. What is wrong below?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Type = 'Renewals', count({$&amp;lt; &lt;STRONG&gt;[Document Type] = {"REN"},&lt;/STRONG&gt; [Days Prior to Renewal]={"&amp;lt;$(=min(SLA))"}&amp;gt;}Distinct [Item Number1]),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Dec 2009 03:48:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-Than-variable/m-p/175128#M43700</guid>
      <dc:creator />
      <dc:date>2009-12-05T03:48:06Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Greater Than variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-Than-variable/m-p/175129#M43701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You went from (with REN selected in Document Type):&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;If(Type = 'Renewals', count({$&amp;lt;[Days Prior to Renewal]={"&amp;lt;$(=min(SLA))"}&amp;gt;}Distinct [Item Number1]),&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;To this:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;If(Type = 'Renewals', count({$&amp;lt; [Document Type] = {"REN"},&lt;BR /&gt;[Days Prior to Renewal]={"&amp;lt;$(=min(SLA))"}&amp;gt;}Distinct [Item Number1]),&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;And you're not getting the same result? I don't see anything unusual, but it's kind of hard to see without knowing the data.&lt;/P&gt;&lt;P&gt;Here are a few things I'd check:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Try single quotes are REN. I'm pretty sure that won't help, but I recall there is a difference between the two (I usually use the doubles).&lt;/LI&gt;&lt;LI&gt;Make sure in your data set it is exactly REN and not "REN " or something.&lt;/LI&gt;&lt;LI&gt;Get rid of the if and compare only the count portion of the expressions.&lt;/LI&gt;&lt;LI&gt;Get rid of the distinct and see if the numbers match&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Those are just a few things to look at. It's hard without seeing the data. If you could scramble up some data and post an example of it being different, someone could probably figure it out.&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Dec 2009 04:28:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-Than-variable/m-p/175129#M43701</guid>
      <dc:creator />
      <dc:date>2009-12-05T04:28:07Z</dc:date>
    </item>
  </channel>
</rss>

