<?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: calculation condition with getselectedcount () in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2159120#M93979</link>
    <description>&lt;P&gt;I'd second what&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28038"&gt;@marcus_sommer&lt;/a&gt;&amp;nbsp;has suggested&lt;/P&gt;
&lt;P&gt;Add the following expression in a textbox and make sure the count is updating when you make selections&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;=GetSelectedCount(Field) &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If the numbers don't change as you select values in that field there are only 2 possible reasons&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1) alternate states in play&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2) wrong field being referred &lt;STRONG&gt;Field&lt;/STRONG&gt; and &lt;STRONG&gt;field&lt;/STRONG&gt; are two different fields as field names are case sensitive&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jan 2024 12:42:07 GMT</pubDate>
    <dc:creator>vinieme12</dc:creator>
    <dc:date>2024-01-08T12:42:07Z</dc:date>
    <item>
      <title>calculation condition with getselectedcount ()</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2158684#M93913</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a table which I would like to conditionally show/hide depending on the users selection in a list box.&lt;/P&gt;
&lt;P&gt;I have tried using the calculation condition with various approaches:&lt;/P&gt;
&lt;P&gt;- "getSelectedCount(Field)&amp;gt;0" -&amp;gt; the table is always hidden, independently on any selection in "Field"&lt;/P&gt;
&lt;P&gt;- "Count(Field)&amp;gt;0" -&amp;gt; the table does not hide at all.&lt;/P&gt;
&lt;P&gt;Can anyone help me understanding what I am doing wrong?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 16:19:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2158684#M93913</guid>
      <dc:creator>tobiasaechter</dc:creator>
      <dc:date>2024-01-05T16:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: calculation condition with getselectedcount ()</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2158688#M93914</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/26140"&gt;@tobiasaechter&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Hi,&amp;nbsp;&amp;nbsp;&lt;BR /&gt;are you inserting double quotes ""?&lt;BR /&gt;if it is removed from the expression.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE id="tw-target-text" class="tw-data-text tw-text-large tw-ta" dir="ltr" data-placeholder="Tradução" data-ved="2ahUKEwjR-qnZ1MaDAxVmu5UCHXniCokQ3ewLegQIBRAQ"&gt;&lt;SPAN class="Y2IQFc"&gt;GetSelectedCount(Field)&amp;gt;0&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MatheusC_0-1704472424455.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/126583iDE384BB3FC955B01/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MatheusC_0-1704472424455.png" alt="MatheusC_0-1704472424455.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Att, Matheus&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 16:34:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2158688#M93914</guid>
      <dc:creator>MatheusC</dc:creator>
      <dc:date>2024-01-05T16:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: calculation condition with getselectedcount ()</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2158696#M93915</link>
      <description>&lt;P&gt;No I didn’t use double quotes. Just this: &amp;nbsp;&lt;SPAN&gt;getSelectedCount(Field)&amp;gt;0&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I only used the double quotes here in the question.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 17:12:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2158696#M93915</guid>
      <dc:creator>tobiasaechter</dc:creator>
      <dc:date>2024-01-05T17:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: calculation condition with getselectedcount ()</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2158704#M93916</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/26140"&gt;@tobiasaechter&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;According to what you said, I don't see any error in the expression, remembering that:&lt;/P&gt;
&lt;P&gt;Hiding graphs using a condition inserted in the Add-ons -&amp;gt; Data handling -&amp;gt; Calculation condition.&lt;/P&gt;
&lt;P&gt;Getselectcount() will return the current number of selected values ​​in the field.&lt;BR /&gt;&lt;BR /&gt;Review the information, if you are unable to resolve the issue, provide more details on the matter.&lt;BR /&gt;&lt;BR /&gt;Att, Matheus&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 18:08:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2158704#M93916</guid>
      <dc:creator>MatheusC</dc:creator>
      <dc:date>2024-01-05T18:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: calculation condition with getselectedcount ()</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2158707#M93917</link>
      <description>&lt;P&gt;Well yes I understand that&amp;nbsp;&lt;SPAN&gt;Getselectcount() will return the current number of selected values ​​in the field.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;hence I am not totally sure if this is the correct expression to begin with. That is why I tried the count() as well.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;happy to learn if you have any suggestion for a better expression to use here.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 18:21:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2158707#M93917</guid>
      <dc:creator>tobiasaechter</dc:creator>
      <dc:date>2024-01-05T18:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: calculation condition with getselectedcount ()</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2158739#M93925</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/26140"&gt;@tobiasaechter&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;maybe this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE id="tw-target-text" class="tw-data-text tw-text-large tw-ta" dir="ltr" data-placeholder="Tradução" data-ved="2ahUKEwjd5uuPj8eDAxWyr5UCHQtKD2EQ3ewLegQIBRAQ"&gt;&lt;SPAN class="Y2IQFc"&gt;GetCurrentSelections()) for the selections in a string, len for the number of characters
len(GetCurrentSelections())&amp;gt;0
or
 Len(Trim(GetCurrentSelections()) &amp;gt; 0)&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;greetings&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 20:51:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2158739#M93925</guid>
      <dc:creator>MatheusC</dc:creator>
      <dc:date>2024-01-05T20:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: calculation condition with getselectedcount ()</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2158786#M93929</link>
      <description>&lt;PRE id="tw-target-text" class="tw-data-text tw-text-large tw-ta" dir="ltr" data-placeholder="Tradução" data-ved="2ahUKEwjd5uuPj8eDAxWyr5UCHQtKD2EQ3ewLegQIBRAQ"&gt;&lt;SPAN class="Y2IQFc"&gt;len(GetCurrentSelections())&amp;gt;0&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;this does work, thanks, but can I also specify one specific field in the brackets?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;like: len(GetCurrentSelections(Field1))&amp;gt;0 ?&lt;/P&gt;
&lt;P&gt;I have tried this but it seems even if I add a specific field (Field1), the table still shows/hides as soon as I do a selection in any of the fields in my data model.&lt;/P&gt;
&lt;P&gt;Ideally I would like to achieve the following:&lt;/P&gt;
&lt;P&gt;(len(GetCurrentSelections(Field1))&amp;gt;0 and&amp;nbsp;len(GetCurrentSelections(Field2)) = 'X') or&amp;nbsp;len(GetCurrentSelections(Field3))&amp;gt;0&lt;/P&gt;
&lt;P&gt;is this even possible?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jan 2024 09:52:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2158786#M93929</guid>
      <dc:creator>tobiasaechter</dc:creator>
      <dc:date>2024-01-06T09:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: calculation condition with getselectedcount ()</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2158924#M93944</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Just the below is sufficient for a calculation condition&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;=getSelectedCount(Field)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;However can I ask what do you mean by Show / Hide? are you trying to completely hide the chart object?&amp;nbsp; calculation condition is only meant for enable/disable chart evaluation&amp;nbsp; not show/hide chart object !&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;the table is always hidden,&lt;STRONG&gt; independently on any selection in "Field"&amp;nbsp; &lt;FONT color="#FF6600"&gt;&amp;lt;&amp;lt; is the "Field" in&amp;nbsp; an alternate state??&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#FF6600"&gt;if yes then you need to specify the statename in&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#FF6600"&gt;=getselectedcount(Field,False(),'statename')&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 02:51:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2158924#M93944</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2024-01-08T02:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: calculation condition with getselectedcount ()</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2158977#M93949</link>
      <description>&lt;P&gt;sorry for not being clear. I meant show/hide the values in the table. I understand that calculation condition does not make the whole table disappear, but rather disables/enables the values shown/calculated in the table.&amp;nbsp;&lt;BR /&gt;This is exactly what I would like to achieve.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If there is no selection the table should show a message like "please select at least one value in Field 1 and 2 or field 3".&amp;nbsp; In case of any selection in these specified fields the table should show/calculate the data.&lt;/P&gt;
&lt;P&gt;I am not using any alternate states.&lt;BR /&gt;=GetSelectedCount(Field) did not seem to work at all though. With this expression the table never calculates the data but always shows the message that the calculation condition is not fulfilled.&lt;/P&gt;
&lt;P&gt;Whereas&amp;nbsp;&lt;SPAN&gt;len(GetCurrentSelections(Field1))&amp;gt;0 seems to work, but I cannot specify any field so far. It rather disables/enables the chart evaluation for any selection in any field.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 07:28:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2158977#M93949</guid>
      <dc:creator>tobiasaechter</dc:creator>
      <dc:date>2024-01-08T07:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: calculation condition with getselectedcount ()</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2159014#M93955</link>
      <description>&lt;P&gt;Make sure that you are calling the right field with the correct typing and not referring to a label for a field or to a calculated dimension.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 09:11:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2159014#M93955</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2024-01-08T09:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: calculation condition with getselectedcount ()</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2159045#M93961</link>
      <description>&lt;P&gt;in a simplified setup I have four fields: Country, Business, Year, Order Volume&lt;BR /&gt;My table has country and business as dimension and SUM(Orders) as measure.&lt;BR /&gt;the calculation condition is:&amp;nbsp;&lt;SPAN&gt;len(GetCurrentSelections(Business))&amp;gt;0&lt;BR /&gt;&lt;BR /&gt;I would have expected that if any value in the field business is selected the&amp;nbsp;table should show/calculate the data. whereas any selection in country or year would not have any influence on the calculation condition.&lt;BR /&gt;&lt;BR /&gt;but the actual behaviour is that any selection in business, country or year does trigger the calculation condition.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 10:09:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2159045#M93961</guid>
      <dc:creator>tobiasaechter</dc:creator>
      <dc:date>2024-01-08T10:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: calculation condition with getselectedcount ()</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2159062#M93965</link>
      <description>&lt;P&gt;The proper way is: getselectedcount(TheRightField). Nearby would be: len(getfieldselections(TheRightField)) by adding an extra layer. Instead of this would be getcurrentselections() in general also be usable but with a lot of extra efforts to extract the relevant information.&lt;/P&gt;
&lt;P&gt;Like above mentioned take a closer look on the real field-names which may differ to the ones which are shown - maybe any qualifying-information is removed or something similar ...&lt;/P&gt;
&lt;P&gt;Further make sure that all relevant objects are within the same selection-state (if any alternate states are applied).&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 10:41:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2159062#M93965</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2024-01-08T10:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: calculation condition with getselectedcount ()</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2159078#M93970</link>
      <description>&lt;P&gt;I think I have figured out the issue.&lt;BR /&gt;&lt;BR /&gt;using getselectedcount(Field) works, but the issue was that I had pre-filtered my field in the filter pane's dimension.&lt;BR /&gt;like my Field has values 1,2,3,4,5 and in my filter pane I had used "if(not match(Field, '3'), Field)" because I did not want the user to be able to select the value 3 in this field.&lt;BR /&gt;If I then tried to select in this filter pane the chart did not react. But if I am not pre-filtering the field the calculation condition works like expected.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 11:12:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2159078#M93970</guid>
      <dc:creator>tobiasaechter</dc:creator>
      <dc:date>2024-01-08T11:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: calculation condition with getselectedcount ()</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2159120#M93979</link>
      <description>&lt;P&gt;I'd second what&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28038"&gt;@marcus_sommer&lt;/a&gt;&amp;nbsp;has suggested&lt;/P&gt;
&lt;P&gt;Add the following expression in a textbox and make sure the count is updating when you make selections&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;=GetSelectedCount(Field) &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If the numbers don't change as you select values in that field there are only 2 possible reasons&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1) alternate states in play&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2) wrong field being referred &lt;STRONG&gt;Field&lt;/STRONG&gt; and &lt;STRONG&gt;field&lt;/STRONG&gt; are two different fields as field names are case sensitive&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 12:42:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2159120#M93979</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2024-01-08T12:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: calculation condition with getselectedcount ()</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2159147#M93986</link>
      <description>&lt;P&gt;is it possible that Qlik thinks the field name changes if I have a list box where the dimension is "Field" vs "=if(not match(Field, 3), Field)"&lt;BR /&gt;I would have assumed the field name is the same in both cases. But this is where the issue was coming from.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 13:54:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2159147#M93986</guid>
      <dc:creator>tobiasaechter</dc:creator>
      <dc:date>2024-01-08T13:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: calculation condition with getselectedcount ()</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2159155#M93989</link>
      <description>&lt;P&gt;It's not a native field anymore else a calculated dimension. In general such approaches should be rather avoided because it didn't only effects selections else prevents the usage of aggr() and/or TOTAL statements and impact the performance.&lt;/P&gt;
&lt;P&gt;In your case it would be probably better to double the field within the data-model - ones complete for admin and power users and the second one with a NULL() replacement for the unwanted values. If there are various value-combinations and/or fields to consider it would hint for the usage of section access to implement a real access control on a user-level.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 14:10:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-condition-with-getselectedcount/m-p/2159155#M93989</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2024-01-08T14:10:58Z</dc:date>
    </item>
  </channel>
</rss>

