<?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: How to ignore/change selection when summing in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-ignore-change-selection-when-summing/m-p/936567#M323285</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure why the formula wasn't working, but I figured out a temporary fix by creating a variable which is equal to the selected state.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({$&amp;lt;Payment_Type={'Loss'}&lt;/P&gt;&lt;P&gt;$(=&lt;/P&gt;&lt;P&gt;if(getselectedcount(ACCIDENT_STATE)=0,'',&lt;/P&gt;&lt;P&gt;', ACCIDENT_STATE={' &amp;amp; chr(39) &amp;amp; Selected_State &amp;amp; chr(39) &amp;amp; '}')&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&amp;gt;} distinct CLAIM_NUMBER)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Sep 2015 21:33:29 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-09-24T21:33:29Z</dc:date>
    <item>
      <title>How to ignore/change selection when summing</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-ignore-change-selection-when-summing/m-p/936561#M323279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am looking to create a bar chart showing the sum of paid for a certain payment category (selected from a field list) divided by the sum of loss, with calendar year on the y-axis as shown below.&amp;nbsp; My chart works perfectly, I can select the payment type and the it gives me accurate outputs.&amp;nbsp; The problem is, if I keep everything the same as shown in the picture, but then also select a state such as Pennsylvania, the output is not correct.&amp;nbsp; I am thinking it has something to do with the formula I used for the expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=Sum(CY_Payment_Amount)/Sum({$&amp;lt;Payment_Type={'Loss'}&amp;gt;}CY_Payment_Amount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;It seems like the formula is ignoring my selection for state.&amp;nbsp; What would be a dynamic way of handling this ? I may want to filter on more additional things than just state.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="screenshot.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/99986_screenshot.jpg" style="height: 257px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2015 19:30:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-ignore-change-selection-when-summing/m-p/936561#M323279</guid>
      <dc:creator />
      <dc:date>2015-09-24T19:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore/change selection when summing</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-ignore-change-selection-when-summing/m-p/936562#M323280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;=Sum(CY_Payment_Amount)/Sum({$&amp;lt;Payment_Type={'Loss'}&amp;gt;}CY_Payment_Amount)&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: 13.3333px;"&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: 13.3333px;"&gt;Above expression will not exclude the state selection. If you want to exclude it something like below has to be written.&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: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum({$&amp;lt;Payment_Type={'Loss'}, State=&amp;gt;}CY_Payment_Amount)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2015 19:46:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-ignore-change-selection-when-summing/m-p/936562#M323280</guid>
      <dc:creator>prabhu0505</dc:creator>
      <dc:date>2015-09-24T19:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore/change selection when summing</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-ignore-change-selection-when-summing/m-p/936563#M323281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I change my chart expression to &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Payment_Type={'Loss'}&amp;gt;}CY_Payment_Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result is the sum of loss by calendar year for all states, even if I have Pennsylvania selected. So it does appear to be ignoring the state selection.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2015 19:56:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-ignore-change-selection-when-summing/m-p/936563#M323281</guid>
      <dc:creator />
      <dc:date>2015-09-24T19:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore/change selection when summing</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-ignore-change-selection-when-summing/m-p/936564#M323282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you give more details regarding why the output isn't correct?&lt;/P&gt;&lt;P&gt;Do the values not change when you select State = Pennsylvania? I don't see any issues with the expression that you currently have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you also tell us a little more about your model? Are Payment Type and State on the same tables? How are they connected? If you put a list box for State on your dashboard and select Pennsylvania - is it connected to all Payment Types?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2015 20:12:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-ignore-change-selection-when-summing/m-p/936564#M323282</guid>
      <dc:creator>cjohnson</dc:creator>
      <dc:date>2015-09-24T20:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore/change selection when summing</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-ignore-change-selection-when-summing/m-p/936565#M323283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In theory it should work as you expect when you select the state of Pennsylvania it should not be ignored.&amp;nbsp; I can only guess that there may be some quirk in your data model and / or data causing this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2015 20:14:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-ignore-change-selection-when-summing/m-p/936565#M323283</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-24T20:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore/change selection when summing</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-ignore-change-selection-when-summing/m-p/936566#M323284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The formula below gives me the desired output.&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Payment_Type={'Loss'},ACCIDENT_STATE={'PA'}&amp;gt;}CY_Payment_Amount)&lt;/P&gt;&lt;P&gt;&lt;IMG alt="PA in formula.jpg" class="jive-image image-1" src="/legacyfs/online/99988_PA in formula.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use this formula:&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum({$&amp;lt;Payment_Type={'Loss'}&amp;gt;}CY_Payment_Amount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then select PA in a list box as the accident state then it gives me the data as though accident state is being ignored. If I then remove the PA selection there is no change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="PA Selected.jpg" class="jive-image image-2" src="/legacyfs/online/99995_PA Selected.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2015 20:29:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-ignore-change-selection-when-summing/m-p/936566#M323284</guid>
      <dc:creator />
      <dc:date>2015-09-24T20:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore/change selection when summing</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-ignore-change-selection-when-summing/m-p/936567#M323285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure why the formula wasn't working, but I figured out a temporary fix by creating a variable which is equal to the selected state.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({$&amp;lt;Payment_Type={'Loss'}&lt;/P&gt;&lt;P&gt;$(=&lt;/P&gt;&lt;P&gt;if(getselectedcount(ACCIDENT_STATE)=0,'',&lt;/P&gt;&lt;P&gt;', ACCIDENT_STATE={' &amp;amp; chr(39) &amp;amp; Selected_State &amp;amp; chr(39) &amp;amp; '}')&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&amp;gt;} distinct CLAIM_NUMBER)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2015 21:33:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-ignore-change-selection-when-summing/m-p/936567#M323285</guid>
      <dc:creator />
      <dc:date>2015-09-24T21:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore/change selection when summing</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-ignore-change-selection-when-summing/m-p/936568#M323286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you using alternate states?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The&amp;nbsp; $ in your expression tells the formula to use the default(inherited) state. If the selections on state are made in another QlikView-State, then the formula would ignore it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2015 22:42:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-ignore-change-selection-when-summing/m-p/936568#M323286</guid>
      <dc:creator>simenkg</dc:creator>
      <dc:date>2015-09-24T22:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore/change selection when summing</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-ignore-change-selection-when-summing/m-p/936569#M323287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I am using multiple states!&amp;nbsp; I didn't realize that would affect it. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 12:58:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-ignore-change-selection-when-summing/m-p/936569#M323287</guid>
      <dc:creator />
      <dc:date>2015-09-25T12:58:50Z</dc:date>
    </item>
  </channel>
</rss>

