<?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 Expressions - Qualifying on a variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expressions-Qualifying-on-a-variable/m-p/357502#M132645</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;I've created a variable based on an If statement which returns 'Y' if a condition is met and 'N' if the condition is not met,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm now trying to qualify on that variable in an expression, but cannot get it to work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.G.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count ( {$&amp;lt; LevelCode = {UG}, $(vname) = {'Y'} &amp;gt;} PersonID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression performs the count regardless of whether the variable (vname) is Y or N.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created the variable to get round another problem, where I am trying to only count the PersonID if 2 fields are equal to each other&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E,G,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count ( {$ &amp;lt;LevelCode = {'UG'}, LengthStudy = YearStudy &amp;gt;} PersonID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but that doesn't work either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The variable is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=(if(LengthStudy = YearStudy, 'Y', 'N')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help!!!!&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Apr 2012 13:20:28 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-04-18T13:20:28Z</dc:date>
    <item>
      <title>Expressions - Qualifying on a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Expressions-Qualifying-on-a-variable/m-p/357502#M132645</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;I've created a variable based on an If statement which returns 'Y' if a condition is met and 'N' if the condition is not met,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm now trying to qualify on that variable in an expression, but cannot get it to work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.G.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count ( {$&amp;lt; LevelCode = {UG}, $(vname) = {'Y'} &amp;gt;} PersonID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression performs the count regardless of whether the variable (vname) is Y or N.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created the variable to get round another problem, where I am trying to only count the PersonID if 2 fields are equal to each other&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E,G,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count ( {$ &amp;lt;LevelCode = {'UG'}, LengthStudy = YearStudy &amp;gt;} PersonID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but that doesn't work either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The variable is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=(if(LengthStudy = YearStudy, 'Y', 'N')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help!!!!&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 13:20:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expressions-Qualifying-on-a-variable/m-p/357502#M132645</guid>
      <dc:creator />
      <dc:date>2012-04-18T13:20:28Z</dc:date>
    </item>
  </channel>
</rss>

