<?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 Re: Want to create a filter based on a calculated expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Want-to-create-a-filter-based-on-a-calculated-expression/m-p/430579#M490248</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;&lt;/P&gt;&lt;P&gt; Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aggr(if(sum({&amp;lt;CostService={'Primary Care'}&amp;gt;} Current_Util)&amp;gt;4,'Yes','No'),Current_Util)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Oct 2012 18:21:40 GMT</pubDate>
    <dc:creator>MayilVahanan</dc:creator>
    <dc:date>2012-10-18T18:21:40Z</dc:date>
    <item>
      <title>Want to create a filter based on a calculated expression</title>
      <link>https://community.qlik.com/t5/QlikView/Want-to-create-a-filter-based-on-a-calculated-expression/m-p/430578#M490247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a table that is counting the number of visits, prescriptions and readmitions for each patient.&amp;nbsp; So the column will read&lt;/P&gt;&lt;P&gt;Patient&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Visits&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Scripts&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Readmits&lt;/P&gt;&lt;P&gt;John Doe&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to be able to create filters that would allow me to limit my data to members with:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&amp;gt;= 5 Visits&lt;/LI&gt;&lt;LI&gt;&amp;gt;=10 Scripts&lt;/LI&gt;&lt;LI&gt;&amp;gt;= 2 Readmits&lt;/LI&gt;&lt;LI&gt;etc&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I try to enter a formula into the selection box it gets grayed out and doesn't work&lt;/P&gt;&lt;P&gt;if(sum({&amp;lt;CostService={'Primary Care'}&amp;gt;} Current_Util)&amp;gt;4,'Yes','No')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 18:11:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Want-to-create-a-filter-based-on-a-calculated-expression/m-p/430578#M490247</guid>
      <dc:creator />
      <dc:date>2012-10-18T18:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: Want to create a filter based on a calculated expression</title>
      <link>https://community.qlik.com/t5/QlikView/Want-to-create-a-filter-based-on-a-calculated-expression/m-p/430579#M490248</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;&lt;/P&gt;&lt;P&gt; Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aggr(if(sum({&amp;lt;CostService={'Primary Care'}&amp;gt;} Current_Util)&amp;gt;4,'Yes','No'),Current_Util)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 18:21:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Want-to-create-a-filter-based-on-a-calculated-expression/m-p/430579#M490248</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-10-18T18:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: Want to create a filter based on a calculated expression</title>
      <link>https://community.qlik.com/t5/QlikView/Want-to-create-a-filter-based-on-a-calculated-expression/m-p/430580#M490249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This seems to give me a 'Yes' whenever there is more than 1, but not necessarily the threshold that I want to set, &amp;gt;4&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 18:44:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Want-to-create-a-filter-based-on-a-calculated-expression/m-p/430580#M490249</guid>
      <dc:creator />
      <dc:date>2012-10-18T18:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Want to create a filter based on a calculated expression</title>
      <link>https://community.qlik.com/t5/QlikView/Want-to-create-a-filter-based-on-a-calculated-expression/m-p/430581#M490250</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;Can you post a sample file? and say your requirement in detail.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 18:46:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Want-to-create-a-filter-based-on-a-calculated-expression/m-p/430581#M490250</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-10-18T18:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: Want to create a filter based on a calculated expression</title>
      <link>https://community.qlik.com/t5/QlikView/Want-to-create-a-filter-based-on-a-calculated-expression/m-p/430582#M490251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I'm looking at record level entries and not aggregations in a table, then I would create an association table called:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VisitBuckets:&lt;/P&gt;&lt;P&gt;Visit, VisitBucket1,VisitBucket2&lt;/P&gt;&lt;P&gt;1, Less than 2, Less than 5&lt;/P&gt;&lt;P&gt;2, Exactly 2 , Less than 5&lt;/P&gt;&lt;P&gt;3, Greater than 2, Less than 5&lt;/P&gt;&lt;P&gt;4, Greater than 2, Less than 5&lt;/P&gt;&lt;P&gt;5, Greater than 2, Exactly 5&lt;/P&gt;&lt;P&gt;6, Greater than 2, Greater than 5&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;1000,Greater than 2, Greater than 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you have an associated dimension(s) that you can use for grouping.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do the same with your other facts that need groups.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This also allows for the work to be done in the load script and reduces in memory processing in production.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 19:41:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Want-to-create-a-filter-based-on-a-calculated-expression/m-p/430582#M490251</guid>
      <dc:creator />
      <dc:date>2012-10-18T19:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Want to create a filter based on a calculated expression</title>
      <link>https://community.qlik.com/t5/QlikView/Want-to-create-a-filter-based-on-a-calculated-expression/m-p/430583#M490252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not familiar with Association tables, but I'm not exactly sure how that works when you are calculating fields rather than using existing fields in the data.&amp;nbsp; So in order to get visits I am summing Current_Util only when CostService = 'Primary Care'. So I'm not sure how you would associate both of those fields as you have described.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I over simplified the expressions because each category is a calculation like the one I just mentioned. And then I'm summing the risk flags to get an overall risk level.&lt;/P&gt;&lt;P&gt;(Ex: Readmits = count({$&amp;lt;VISIT_TYPE={'IP'},READMIT_90DAYS={'1'}&amp;gt;} DISTINCT VISITNUMBER))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Risk Level = if(visits &amp;gt; 5,1,0) + if(Scripts &amp;gt; 10,1,0) + if(Readmits &amp;gt; 2,1,0) [0=Low, 1=Medium, &amp;gt;1=High]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I want a filter for each risk and the overall risk level&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 18:57:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Want-to-create-a-filter-based-on-a-calculated-expression/m-p/430583#M490252</guid>
      <dc:creator />
      <dc:date>2012-10-19T18:57:26Z</dc:date>
    </item>
  </channel>
</rss>

