<?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 Variable in Chart Expression showing chart total instead of dimension total in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-in-Chart-Expression-showing-chart-total-instead-of/m-p/1242080#M394378</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have created a variable to return the total number of opted in profiles, but when i use this variable in a chart, it's returning the total for the chart as the result for each dimension.&amp;nbsp; When i put the same expression directly into the chart expression, it works fine, but when i use the variable, it doesn't.&amp;nbsp; Can anyone tell me what i'm missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the expression, i'm counting distinct profile IDs where they have an Opt In Flag = 1 but NOT Opt In Rem = 1 or OptOut Flag = 1:&lt;/P&gt;&lt;P&gt;=Count(DISTINCT {&amp;lt;OptIn_Flag = {1}, ProfileID = e( {&amp;lt;OptInRem_Flag = {1}&amp;gt;} ProfileID), ProfileID = e( {&amp;lt;OptOut_Flag = {1}&amp;gt;} ProfileID)&amp;gt;} ProfileID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Opt In Variable.png" class="jive-image image-1" src="/legacyfs/online/156848_Opt In Variable.png" style="height: 261px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Mar 2017 13:26:18 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-03-20T13:26:18Z</dc:date>
    <item>
      <title>Variable in Chart Expression showing chart total instead of dimension total</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-Chart-Expression-showing-chart-total-instead-of/m-p/1242080#M394378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have created a variable to return the total number of opted in profiles, but when i use this variable in a chart, it's returning the total for the chart as the result for each dimension.&amp;nbsp; When i put the same expression directly into the chart expression, it works fine, but when i use the variable, it doesn't.&amp;nbsp; Can anyone tell me what i'm missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the expression, i'm counting distinct profile IDs where they have an Opt In Flag = 1 but NOT Opt In Rem = 1 or OptOut Flag = 1:&lt;/P&gt;&lt;P&gt;=Count(DISTINCT {&amp;lt;OptIn_Flag = {1}, ProfileID = e( {&amp;lt;OptInRem_Flag = {1}&amp;gt;} ProfileID), ProfileID = e( {&amp;lt;OptOut_Flag = {1}&amp;gt;} ProfileID)&amp;gt;} ProfileID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Opt In Variable.png" class="jive-image image-1" src="/legacyfs/online/156848_Opt In Variable.png" style="height: 261px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 13:26:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-Chart-Expression-showing-chart-total-instead-of/m-p/1242080#M394378</guid>
      <dc:creator />
      <dc:date>2017-03-20T13:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in Chart Expression showing chart total instead of dimension total</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-Chart-Expression-showing-chart-total-instead-of/m-p/1242081#M394379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Remove the '=' sign in front of your variable definition and see if that helps?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3996"&gt;The Little Equals Sign&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 13:34:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-Chart-Expression-showing-chart-total-instead-of/m-p/1242081#M394379</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-20T13:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in Chart Expression showing chart total instead of dimension total</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-Chart-Expression-showing-chart-total-instead-of/m-p/1242082#M394380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashley,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have the = sign in your variable definition. You have to remove it and the variable will work fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Carlos M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 13:37:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-Chart-Expression-showing-chart-total-instead-of/m-p/1242082#M394380</guid>
      <dc:creator>CarlosAMonroy</dc:creator>
      <dc:date>2017-03-20T13:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in Chart Expression showing chart total instead of dimension total</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-Chart-Expression-showing-chart-total-instead-of/m-p/1242083#M394381</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;try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;copy and paste below expression in a variable (without "=" infront of the expression.)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Count(DISTINCT {$&amp;lt;OptIn_Flag = {1}, OptInRem_Flag -= {1}, OptOut_Flag -= {1}&amp;gt;} ProfileID)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;then in chart expression write this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=$(variablename) (i.e variabel name is your variable name)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 13:43:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-Chart-Expression-showing-chart-total-instead-of/m-p/1242083#M394381</guid>
      <dc:creator>jeevays7</dc:creator>
      <dc:date>2017-03-20T13:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in Chart Expression showing chart total instead of dimension total</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-Chart-Expression-showing-chart-total-instead-of/m-p/1242084#M394382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marking this one as complete because it includes the extra step to add the dollar sign expansion to the variable name in the expression.&amp;nbsp; However, changing the syntax of the set analysis was not necessary - it still works the way I had it as long as i removed the = from the beginning.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 15:41:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-Chart-Expression-showing-chart-total-instead-of/m-p/1242084#M394382</guid>
      <dc:creator />
      <dc:date>2017-03-20T15:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in Chart Expression showing chart total instead of dimension total</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-Chart-Expression-showing-chart-total-instead-of/m-p/1242085#M394383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;your expression also correct. the main thing is "=" only.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2017 06:31:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-Chart-Expression-showing-chart-total-instead-of/m-p/1242085#M394383</guid>
      <dc:creator>jeevays7</dc:creator>
      <dc:date>2017-03-21T06:31:09Z</dc:date>
    </item>
  </channel>
</rss>

