<?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 Why GetSelectedCount () changes the display ...? in Management &amp; Governance</title>
    <link>https://community.qlik.com/t5/Management-Governance/Why-GetSelectedCount-changes-the-display/m-p/1368405#M31297</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a model on Qlick Sense that show the sales behavior of a specific category (Events), for a certain period of time. We currently have registers from sales for three years: 2015-2017.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The objective was to show, by default, the 2017 results, as long as there wasn´t any year selected on&amp;nbsp; the "SalesYear" filter&lt;SPAN style="font-size: 10pt;"&gt; (AñoVenta in Spanish).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tha´ts why I decided to use the function &lt;SPAN style="font-size: 10pt;"&gt;GetSelectedCount() that returns the number of selections active on a filter. If this number is cero then there are no active selections, which then should trigger the default behavior of showing just 2017.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression I used was:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;if (GetSelectedCount([AñoVenta])= 0,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;(Sum({1&amp;lt;[Categoría_Ingreso]={"Eventos"}&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *1&amp;lt;[AñoVenta]={"2017"}&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;}ValorBaseFacturado)/1000000),&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;(Sum({$&amp;lt;[Categoría_Ingreso]={"Eventos"}&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;ValorBaseFacturado)/1000000))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the chart, however, all years are show in the dimension axis, with only the months of 2017 showing any values. The others are shown with values of 0&lt;SPAN style="font-size: 10pt;"&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="165404" alt="bad.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/165404_bad.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In contrast, this is the original expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;Sum({$&amp;lt;[Categoría_Ingreso]={"Eventos"}&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *1&amp;lt;[AñoVenta]={"2017"}&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;ValorBaseFacturado)/1000000&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That shows this chart, which is the one I want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="165405" alt="good.png" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/165405_good.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;I would like to know why including that "if" changes the chart so much, and if there is a way to avoid that...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is how the screen looks with the filters:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="165406" alt="Captura de pantalla 2017-05-31 11.09.21.png" class="jive-image image-3" src="/legacyfs/online/165406_Captura de pantalla 2017-05-31 11.09.21.png" style="height: 451px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks a lot for any help you guys can provide...&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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jan 2025 17:06:43 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2025-01-29T17:06:43Z</dc:date>
    <item>
      <title>Why GetSelectedCount () changes the display ...?</title>
      <link>https://community.qlik.com/t5/Management-Governance/Why-GetSelectedCount-changes-the-display/m-p/1368405#M31297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a model on Qlick Sense that show the sales behavior of a specific category (Events), for a certain period of time. We currently have registers from sales for three years: 2015-2017.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The objective was to show, by default, the 2017 results, as long as there wasn´t any year selected on&amp;nbsp; the "SalesYear" filter&lt;SPAN style="font-size: 10pt;"&gt; (AñoVenta in Spanish).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tha´ts why I decided to use the function &lt;SPAN style="font-size: 10pt;"&gt;GetSelectedCount() that returns the number of selections active on a filter. If this number is cero then there are no active selections, which then should trigger the default behavior of showing just 2017.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression I used was:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;if (GetSelectedCount([AñoVenta])= 0,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;(Sum({1&amp;lt;[Categoría_Ingreso]={"Eventos"}&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *1&amp;lt;[AñoVenta]={"2017"}&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;}ValorBaseFacturado)/1000000),&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;(Sum({$&amp;lt;[Categoría_Ingreso]={"Eventos"}&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;ValorBaseFacturado)/1000000))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the chart, however, all years are show in the dimension axis, with only the months of 2017 showing any values. The others are shown with values of 0&lt;SPAN style="font-size: 10pt;"&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="165404" alt="bad.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/165404_bad.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In contrast, this is the original expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;Sum({$&amp;lt;[Categoría_Ingreso]={"Eventos"}&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *1&amp;lt;[AñoVenta]={"2017"}&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;ValorBaseFacturado)/1000000&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That shows this chart, which is the one I want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="165405" alt="good.png" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/165405_good.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;I would like to know why including that "if" changes the chart so much, and if there is a way to avoid that...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is how the screen looks with the filters:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="165406" alt="Captura de pantalla 2017-05-31 11.09.21.png" class="jive-image image-3" src="/legacyfs/online/165406_Captura de pantalla 2017-05-31 11.09.21.png" style="height: 451px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks a lot for any help you guys can provide...&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2025 17:06:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Why-GetSelectedCount-changes-the-display/m-p/1368405#M31297</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-01-29T17:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: Why GetSelectedCount () changes the display ...?</title>
      <link>https://community.qlik.com/t5/Management-Governance/Why-GetSelectedCount-changes-the-display/m-p/1368406#M31298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you unchecked 'Include Zero Values' under Data handling?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2017 19:50:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Why-GetSelectedCount-changes-the-display/m-p/1368406#M31298</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-05-31T19:50:38Z</dc:date>
    </item>
  </channel>
</rss>

