<?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 Can we use Variables in Class Function? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Can-we-use-Variables-in-Class-Function/m-p/464772#M1151615</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have 3 Variables defined as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMinChargedAmount&amp;nbsp;&amp;nbsp;&amp;nbsp; Min(CHARGED_AMOUNT)&lt;/P&gt;&lt;P&gt;vMaxChargedAmount&amp;nbsp;&amp;nbsp; Max(CHARGED_AMOUNT)&lt;/P&gt;&lt;P&gt;vChargedAmountWidth&amp;nbsp; ($(vMaxChargedAmount) - $(vMinChargedAmount))/10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am creating a bar chart with &lt;STRONG&gt;dimension &lt;/STRONG&gt;as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Class(CHARGED_AMOUNT,$(vChargedAmountWidth))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count (DISTINCT CHARGED_AMOUNT)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically I am trying to calculate the Class width through variable. If I hardcode value it works. But when I use variables I am getting error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the attached file for Screens (Manual_Definition.PNG: OK, Variable_Calculated.PNG Not OK)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the mistake I am making?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 May 2013 23:23:51 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-05-15T23:23:51Z</dc:date>
    <item>
      <title>Can we use Variables in Class Function?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-we-use-Variables-in-Class-Function/m-p/464772#M1151615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have 3 Variables defined as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMinChargedAmount&amp;nbsp;&amp;nbsp;&amp;nbsp; Min(CHARGED_AMOUNT)&lt;/P&gt;&lt;P&gt;vMaxChargedAmount&amp;nbsp;&amp;nbsp; Max(CHARGED_AMOUNT)&lt;/P&gt;&lt;P&gt;vChargedAmountWidth&amp;nbsp; ($(vMaxChargedAmount) - $(vMinChargedAmount))/10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am creating a bar chart with &lt;STRONG&gt;dimension &lt;/STRONG&gt;as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Class(CHARGED_AMOUNT,$(vChargedAmountWidth))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count (DISTINCT CHARGED_AMOUNT)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically I am trying to calculate the Class width through variable. If I hardcode value it works. But when I use variables I am getting error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the attached file for Screens (Manual_Definition.PNG: OK, Variable_Calculated.PNG Not OK)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the mistake I am making?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 23:23:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-we-use-Variables-in-Class-Function/m-p/464772#M1151615</guid>
      <dc:creator />
      <dc:date>2013-05-15T23:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use Variables in Class Function?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-we-use-Variables-in-Class-Function/m-p/464773#M1151616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you need to force the variables to be a single calculation. Add&amp;nbsp; an "=" to your variable value defintion. That will result in the the calculated number being substituted in the class() function instead of the expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://robwunderlich.com"&gt;http://robwunderlich.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2013 03:23:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-we-use-Variables-in-Class-Function/m-p/464773#M1151616</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2013-05-16T03:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use Variables in Class Function?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-we-use-Variables-in-Class-Function/m-p/464774#M1151617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Rob Wunderlich. Appreciate your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2013 12:38:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-we-use-Variables-in-Class-Function/m-p/464774#M1151617</guid>
      <dc:creator />
      <dc:date>2013-05-16T12:38:06Z</dc:date>
    </item>
  </channel>
</rss>

