<?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 Class function with variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Class-function-with-variable/m-p/274152#M1202945</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to use the class funtion to count the number of purchases in different brackets. I have written the following in the calculated dimension&lt;/P&gt;&lt;P&gt;=class(PurchaseValue,vWidth,'Purchase Size')&lt;/P&gt;&lt;P&gt;The problem i have is that i just can't take the purchase value direct from the data source as i need to exclude a few entries to get the correct number. To do this i have written the below variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;vpurchase = Reregistration&lt;/B&gt;={&lt;B&gt;No&lt;/B&gt;},&lt;B&gt;Switch&lt;/B&gt;={&lt;B&gt;No&lt;/B&gt;}&lt;/P&gt;&lt;P&gt;This variable works but i am stuck as to how i encorporate the variable into the class function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried the below but it doesn't work can someone help?&lt;/P&gt;&lt;P&gt;=class((vpurchase)PurchaseValue,vWidth,'Purchase Size')&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Sep 2010 11:58:50 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-09-03T11:58:50Z</dc:date>
    <item>
      <title>Class function with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Class-function-with-variable/m-p/274152#M1202945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to use the class funtion to count the number of purchases in different brackets. I have written the following in the calculated dimension&lt;/P&gt;&lt;P&gt;=class(PurchaseValue,vWidth,'Purchase Size')&lt;/P&gt;&lt;P&gt;The problem i have is that i just can't take the purchase value direct from the data source as i need to exclude a few entries to get the correct number. To do this i have written the below variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;vpurchase = Reregistration&lt;/B&gt;={&lt;B&gt;No&lt;/B&gt;},&lt;B&gt;Switch&lt;/B&gt;={&lt;B&gt;No&lt;/B&gt;}&lt;/P&gt;&lt;P&gt;This variable works but i am stuck as to how i encorporate the variable into the class function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried the below but it doesn't work can someone help?&lt;/P&gt;&lt;P&gt;=class((vpurchase)PurchaseValue,vWidth,'Purchase Size')&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Sep 2010 11:58:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Class-function-with-variable/m-p/274152#M1202945</guid>
      <dc:creator />
      <dc:date>2010-09-03T11:58:50Z</dc:date>
    </item>
    <item>
      <title>Class function with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Class-function-with-variable/m-p/274153#M1202946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this?&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;=class(aggr(only({&amp;lt;Reregistration={'No'},Switch={'No'}&amp;gt;} PurchaseValue),PurchaseValue),vWidth,'Purchase Size')&lt;/P&gt;&lt;P&gt;Or if you really want to use your variable, probably this?&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;=class(aggr(only({&amp;lt;$(vpurchase)&amp;gt;} PurchaseValue),PurchaseValue),vWidth,'Purchase Size')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Sep 2010 22:56:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Class-function-with-variable/m-p/274153#M1202946</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-09-03T22:56:24Z</dc:date>
    </item>
    <item>
      <title>Class function with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Class-function-with-variable/m-p/274154#M1202947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Though it might be easier, and would likely run faster, if you create a "No Reregistration No Switch Purchase Value" field, whatever you want to call it.&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;if(Reregestration='No' and Switch='No',PurchaseValue) as "No Reregistration No Switch Purchase Value"&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;=class("No Reregistration No Switch Purchase Value",vWidth,'Purchase Size')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Sep 2010 22:59:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Class-function-with-variable/m-p/274154#M1202947</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-09-03T22:59:04Z</dc:date>
    </item>
  </channel>
</rss>

