<?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: Filtering Based on Expression Results in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437410#M557868</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did try using the list box, and it didn't work.&lt;/P&gt;&lt;P&gt;As I said above, the list box looked correct, but when you selected "A", it also selected "B" automatically and the values that displayed weren't correct.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;There are 800+ A's and 1000+ B's, and 10000+ C's&lt;/P&gt;&lt;P&gt;When I click A using the list box (and I get A,B) there are only 640 records showing and C only has 4000.&lt;/P&gt;&lt;P&gt;Additionally, many of the values are wrong.&amp;nbsp; I filter for A (get A, B) and it shows C's...&lt;/P&gt;&lt;P&gt;-Melanie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Jun 2013 14:10:42 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-06-04T14:10:42Z</dc:date>
    <item>
      <title>Filtering Based on Expression Results</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437406#M557864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an expression in my tool that looks at cumulative percent of a code, and then assigns a value of A, B, or C based on that volume.&lt;/P&gt;&lt;P&gt;Something like the below, except Cumluative Perent is in itself a calculation.&lt;/P&gt;&lt;P&gt;If(CumulativePercent&amp;lt;=.8,'A', if(CumulativePercent&amp;lt;=.95,'B',C))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works great.&amp;nbsp; &lt;/P&gt;&lt;P&gt;However, I want to be able to create a filter that a user can select, to show only A, B, or C codes (or some combination thereof).&amp;nbsp; &lt;/P&gt;&lt;P&gt;Additionally, if the user click on B in the straight table, instead of giving me all instances of "b", it gives me just that one item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to create that filter and fix the table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, Melanie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 13:10:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437406#M557864</guid>
      <dc:creator />
      <dc:date>2013-06-04T13:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Based on Expression Results</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437407#M557865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you doing the if statement you posted in the front end ? Can it be done in the script, or is it dynamic and dependent upon the calculation changing on the front end ?&lt;/P&gt;&lt;P&gt;I suspect you want the generate this A/B/C field on the front end. Try creating a list box, choosing expression from the bottom of the list of fields and adding your expression in to the Edit Expression window that opens up.&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 13:14:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437407#M557865</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-06-04T13:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Based on Expression Results</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437408#M557866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've never taken a Qlikview class, so everything is self taught.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I tried to do it in a script, but my calculation has a sum(total(FIELD)) and the script didn't recognize the "total" even though it did in my expression...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what is working for me as an expression:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if((RollingSales/sum(Total(TotalSales2)))&amp;lt;=.8,'A',if((RollingSales/sum(Total(TotalSales2)))&amp;lt;=.95,'B','C'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we can get it so that works in the script, that would be fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the list box idea, and it gives me the choices, A, B, C, but when you click on them, they don't relate to the values assigned correctly.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Any other ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 13:59:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437408#M557866</guid>
      <dc:creator />
      <dc:date>2013-06-04T13:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Based on Expression Results</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437409#M557867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try putting the expression that works for you into a list box (see attached).&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 14:04:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437409#M557867</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-06-04T14:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Based on Expression Results</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437410#M557868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did try using the list box, and it didn't work.&lt;/P&gt;&lt;P&gt;As I said above, the list box looked correct, but when you selected "A", it also selected "B" automatically and the values that displayed weren't correct.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;There are 800+ A's and 1000+ B's, and 10000+ C's&lt;/P&gt;&lt;P&gt;When I click A using the list box (and I get A,B) there are only 640 records showing and C only has 4000.&lt;/P&gt;&lt;P&gt;Additionally, many of the values are wrong.&amp;nbsp; I filter for A (get A, B) and it shows C's...&lt;/P&gt;&lt;P&gt;-Melanie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 14:10:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437410#M557868</guid>
      <dc:creator />
      <dc:date>2013-06-04T14:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Based on Expression Results</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437411#M557869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, missed your statement about trying it in a list box.&lt;/P&gt;&lt;P&gt;What is the dimension that you got this A/B/C expresison working against in a chart ?&lt;/P&gt;&lt;P&gt;You mention that you calulations has a sum(total(FIELD)) in it. You can add the dimension that a Total is being grouped by in to the brackets, in the format total(&amp;lt;FieldName&amp;gt; FieldBeingCalculated)&lt;/P&gt;&lt;P&gt;Can you post a qvw sample ?&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 14:21:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437411#M557869</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-06-04T14:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Based on Expression Results</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437412#M557870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the dimension that you got this A/B/C expresison working against in a chart ?&lt;/P&gt;&lt;P&gt;Item&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You mention that you calulations has a sum(total(FIELD)) in it. You can add the dimension that a Total is being grouped by in to the brackets, in the format total(&amp;lt;FieldName&amp;gt; FieldBeingCalculated)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to do that, but it still didn't accept Total being a valid calculation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you post a qvw sample ?&lt;/P&gt;&lt;P&gt;I had to remove 99% of the tool and then create a fake inline table for security reasons, but I kept the issue.&amp;nbsp; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/laugh.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Melanie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 14:38:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437412#M557870</guid>
      <dc:creator />
      <dc:date>2013-06-04T14:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Based on Expression Results</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437413#M557871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can see your expression doesn't aggregate the RollingSum value. If there is no aggregation function used, QlikView will assume you mean only(RollingSum). In this instance you might want to use sum(RollingSum).&lt;/P&gt;&lt;P&gt;Other than that I can't see too much in this sample. for your info, you can scramble dimensions on the Document properties, but I appreciate you may not want to.&lt;/P&gt;&lt;P&gt;A couple more points (I have to go in a sec):&lt;/P&gt;&lt;P&gt;1. You may find there is not enough data available to make such a filter. Once out of the confines of a chart and the dimensions that it is slicing an expression by, what can QlikView use to decide whether a datapoint qualifies as A, B or C&lt;/P&gt;&lt;P&gt;2. It is good to perform such calculatons on the front end, so they are recalculated when filters limit the data. However, you may have more data available for you to perform your test on within the script.&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 14:58:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437413#M557871</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-06-04T14:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Based on Expression Results</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437414#M557872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ideally, I wouldn't want the designation, ABC, to change.&amp;nbsp; &lt;/P&gt;&lt;P&gt;An item should be assigned an ABC value based on sales, regardless of the other filters that are selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The if statement works in the chart, but I want to do the equivalent in the script so it is not variable and so it is filterable.&lt;/P&gt;&lt;P&gt;Is that possible?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 15:11:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437414#M557872</guid>
      <dc:creator />
      <dc:date>2013-06-04T15:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Based on Expression Results</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437415#M557873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of Scripting, another possible solution is having the expression not update based on filtering.&lt;/P&gt;&lt;P&gt;Is that possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now, the expression is correct, but when you filter on it (select 'A') it recalculates all the values.&amp;nbsp; Can Qlikview prevent that somehow?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 18:57:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437415#M557873</guid>
      <dc:creator />
      <dc:date>2013-06-04T18:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Based on Expression Results</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437416#M557874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can ignore filters within set analysis, by using the syntax sum({&amp;lt;{Year=,Month=,Date={'$(SelectedDate)'}&amp;gt;} Field). Set analysis is quite complicated, but there are plenty of references to get you started. However, in this instance the expression you are adding into the list box is not a field that can be manipulated (like Year and Month are in the example).&lt;/P&gt;&lt;P&gt;If you think the value of your calculation, and it's relationship to the various datapoints will not change when filtering happens, then putting the calculation into a script is worthwhile. What you may be able to do is set up a flag that is set up A, B or C.&lt;/P&gt;&lt;P&gt;If you don't want to send out the full application you are building, perhaps you can send the portion of the script in which the RollingSales, TotalSales and Product/Item are defined. From this I may be able to advise you on how to set up such a flag.&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 11:18:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437416#M557874</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-06-05T11:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Based on Expression Results</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437417#M557875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Item and TotalSales2 are coming in from a SQL table, which I swapped for an inline load. &lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;All that is needed for this calculation is item codes and their total sales.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;I did include how RollingSales was calculated see below:&lt;/SPAN&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;In the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I sorted the data by TotalSales2 decending.&amp;nbsp; Then created a cumulative sum of TotalSales2 called RollingSales.&lt;SPAN&gt;&lt;SPAN id="mce_marker"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN id="mce_marker"&gt;&lt;SPAN id="mce_marker"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&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;In the chart:&lt;SPAN id="mce_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then created an expression called Cumulative%, which is the RollingSum divided by the Sum Total of all TotalSales2 = &lt;SPAN style="color: #800000; font-size: 8pt;"&gt;RollingSales&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Total&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TotalSales2&lt;/SPAN&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;&lt;/P&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;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then created a second expression called ABC which looked at the Cumulative% and assigned a value of A, B or C depending on an if statement as follows: &lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;((&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;RollingSales&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Total&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TotalSales2&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)))&amp;lt;=.8,'A',&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;((&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;RollingSales&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Total&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TotalSales2&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)))&amp;lt;=.95,'B','C')) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, the above ABC expression changes depending on filters.&amp;nbsp; It would be easiest (I believe) if this calculation was done in the script, but I'm having trouble with the "Total" function which I cannot get to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN id="mce_marker"&gt;&lt;SPAN id="mce_marker"&gt;Hope this clarifies, Melanie&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 12:47:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437417#M557875</guid>
      <dc:creator />
      <dc:date>2013-06-05T12:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Based on Expression Results</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437418#M557876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you would like to do something like this in the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Load sales data into Sales table&lt;/P&gt;&lt;P&gt;2. Load products into Products table&lt;/P&gt;&lt;P&gt;3. Left join onto Sales table sum of all sales&lt;/P&gt;&lt;P&gt;4. Left join onto Products table sum of Sales value for each product&lt;/P&gt;&lt;P&gt;5. Left join onto Sales table sum of Sales value for all products from step 4, for each product&lt;/P&gt;&lt;P&gt;6. Left join onto Products table sum of Product Sales divided by sum of all products&lt;/P&gt;&lt;P&gt;7. Left join onto Sales table ABC flag based on calculation from step 6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left joins where you sum up sales values need to include a GROUP BY clause, to say what you are summing up 'by'. Syntax for some of these steps could be as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Left join onto Sales table sum of all sales&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT JOIN (Sales) LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SalesKey,&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // A unique identifier of each sales record&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(SalesValue) AS Sales_TotalSalesValue&lt;/P&gt;&lt;P&gt;RESIDENT Sales;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Left join onto Products table sum of Sales value for each product&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT JOIN (Products) LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProductKey,&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // The key of the Product that exists on the Sales and Product tables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(SalesValue) AS Product_TotalSalesValue&lt;/P&gt;&lt;P&gt;RESIDENT Sales&lt;/P&gt;&lt;P&gt;GROUP BY ProductKey;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. Left join onto Sales table sum of Sales value for all products from step 4, for each product&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT JOIN (Sales) LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProductKey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product_TotalSalesValue AS Sales_TotalProductSalesValue&lt;/P&gt;&lt;P&gt;RESIDENT Products;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. Left join onto Sales table sum of Product Sales divided by sum of all products, as well as the ABC flag&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT JOIN (Sales) LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SalesKey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales_TotalProductSalesValue/Sales_TotalSalesValue AS Sales_Calc&lt;/P&gt;&lt;P&gt;RESIDENT Products;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7. Left join onto Sales table ABC flag based on calculation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT JOIN (Sales) LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SalesKey, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Fractile(Sales_Calc,0.8),'A',if(Fractile(Sales_Calc,0.95),'B','C')) AS Sales_CalcFilter&lt;/P&gt;&lt;P&gt;RESIDENT Products; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this is helpful. You will have to tweak it of course, but if it doesn't suit your purposes you might want to repost your question (as seeing this many responses sometimes prevents members viewing posts)&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 15:03:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437418#M557876</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-06-05T15:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Based on Expression Results</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437419#M557877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't believe you use on-the-fly calculation results as the criteria for a filter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Sep 2017 16:35:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437419#M557877</guid>
      <dc:creator>giordi</dc:creator>
      <dc:date>2017-09-02T16:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Based on Expression Results</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437420#M557878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to set "Searchable" for the column (Properties-&amp;gt;Presentation). This way user will have to enter some substring for searching and as result of search proper filters will be set on dimensions. It is not so convienent as in case of just cklicking on the value of interest, but you can achieve a goal of filtering the records you are interested in.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="FilterOfExpression.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/190680_FilterOfExpression.png" style="height: 222px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jan 2018 14:41:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-Based-on-Expression-Results/m-p/437420#M557878</guid>
      <dc:creator>rimantasendriuk</dc:creator>
      <dc:date>2018-01-19T14:41:04Z</dc:date>
    </item>
  </channel>
</rss>

