<?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 filter in a chart expression not working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/filter-in-a-chart-expression-not-working/m-p/316127#M584171</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For Ex: If I have data as below in the table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MONTH, MEAL_TYPE, SPEND, EMPLOYEE_ID&lt;/P&gt;&lt;P&gt;JAN,Lunch,20, 100&lt;/P&gt;&lt;P&gt;JAN,Breakfast,20,101&lt;/P&gt;&lt;P&gt;FEB,Dinner,20,102&lt;/P&gt;&lt;P&gt;FEB,Dinner,4,103&lt;/P&gt;&lt;P&gt;MAR,Lunch,20,102&lt;/P&gt;&lt;P&gt;MAR,Lunch,3,103&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like get the total count of employees who had spent greater than 5 in each meal_type category for each month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I have MONTH and MEAL_TYPE as Dimensions in chart and in expression, I have formula as below. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;=If(SPEND&amp;gt; 5,Count (DISTINCT EMPLOYEE_ID),1)&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's returning 1 always. If I just have Count (DISTINCT EMPLOYEE_ID), It's working , but I need results only where SPEND &amp;gt; 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot filter at the Table level as I may need&amp;nbsp; all records in another chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know how can i resolve the above issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naveen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Oct 2011 22:00:23 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-10-05T22:00:23Z</dc:date>
    <item>
      <title>filter in a chart expression not working</title>
      <link>https://community.qlik.com/t5/QlikView/filter-in-a-chart-expression-not-working/m-p/316127#M584171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For Ex: If I have data as below in the table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MONTH, MEAL_TYPE, SPEND, EMPLOYEE_ID&lt;/P&gt;&lt;P&gt;JAN,Lunch,20, 100&lt;/P&gt;&lt;P&gt;JAN,Breakfast,20,101&lt;/P&gt;&lt;P&gt;FEB,Dinner,20,102&lt;/P&gt;&lt;P&gt;FEB,Dinner,4,103&lt;/P&gt;&lt;P&gt;MAR,Lunch,20,102&lt;/P&gt;&lt;P&gt;MAR,Lunch,3,103&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like get the total count of employees who had spent greater than 5 in each meal_type category for each month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I have MONTH and MEAL_TYPE as Dimensions in chart and in expression, I have formula as below. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;=If(SPEND&amp;gt; 5,Count (DISTINCT EMPLOYEE_ID),1)&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's returning 1 always. If I just have Count (DISTINCT EMPLOYEE_ID), It's working , but I need results only where SPEND &amp;gt; 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot filter at the Table level as I may need&amp;nbsp; all records in another chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know how can i resolve the above issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naveen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2011 22:00:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/filter-in-a-chart-expression-not-working/m-p/316127#M584171</guid>
      <dc:creator />
      <dc:date>2011-10-05T22:00:23Z</dc:date>
    </item>
    <item>
      <title>filter in a chart expression not working</title>
      <link>https://community.qlik.com/t5/QlikView/filter-in-a-chart-expression-not-working/m-p/316128#M584172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I could resolve it by the below formula&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=((COUNT(DISTINCT( if([SPEND] &amp;gt; 5,[EMPLOYEE_ID])))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2011 23:00:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/filter-in-a-chart-expression-not-working/m-p/316128#M584172</guid>
      <dc:creator />
      <dc:date>2011-10-05T23:00:53Z</dc:date>
    </item>
  </channel>
</rss>

