<?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: Using If and getselectedcount in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-If-and-getselectedcount/m-p/1312784#M838512</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then you want&lt;/P&gt;&lt;P&gt;=if(getselectedcount(CostCenterCode)&amp;gt;0,'Test','Space')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The way you have it written now is less than 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 May 2017 20:40:34 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-05-09T20:40:34Z</dc:date>
    <item>
      <title>Using If and getselectedcount</title>
      <link>https://community.qlik.com/t5/QlikView/Using-If-and-getselectedcount/m-p/1312779#M838507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a text object that I would like to display "Test" if there are selections made for the CostCenterCode with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;getselectedcount(CostCenterCode).&amp;nbsp; Otherwise, display "Space."&amp;nbsp; I created the expression below and put it into the Text area of the Text Object.&amp;nbsp; I am not getting just the Test or Display.&amp;nbsp; I get a text with the code that I wrote.&amp;nbsp; I have researched but have not found anything to resolve this issue.&amp;nbsp; I hope you can help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(getselectedcount(CostCenterCode)&amp;lt;1, 'Test', 'Space'); &lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/162680_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-If-and-getselectedcount/m-p/1312779#M838507</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using If and getselectedcount</title>
      <link>https://community.qlik.com/t5/QlikView/Using-If-and-getselectedcount/m-p/1312780#M838508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try putting a equal (=) in the front:&lt;/P&gt;&lt;P&gt;=if(getselectedcount(CostCenterCode)&amp;lt;1, 'Test', 'Space')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Also remove the colon at the end.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 May 2017 20:11:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-If-and-getselectedcount/m-p/1312780#M838508</guid>
      <dc:creator>trdandamudi</dc:creator>
      <dc:date>2017-05-09T20:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using If and getselectedcount</title>
      <link>https://community.qlik.com/t5/QlikView/Using-If-and-getselectedcount/m-p/1312781#M838509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got an error message if I do that,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/162681_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 May 2017 20:12:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-If-and-getselectedcount/m-p/1312781#M838509</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-09T20:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using If and getselectedcount</title>
      <link>https://community.qlik.com/t5/QlikView/Using-If-and-getselectedcount/m-p/1312782#M838510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to remove the semi colon at the end:&lt;/P&gt;&lt;P&gt;=if(getselectedcount(CostCenterCode)&amp;lt;1, 'Test', 'Space')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 May 2017 20:31:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-If-and-getselectedcount/m-p/1312782#M838510</guid>
      <dc:creator>trdandamudi</dc:creator>
      <dc:date>2017-05-09T20:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: Using If and getselectedcount</title>
      <link>https://community.qlik.com/t5/QlikView/Using-If-and-getselectedcount/m-p/1312783#M838511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/162682_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 May 2017 20:35:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-If-and-getselectedcount/m-p/1312783#M838511</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-09T20:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using If and getselectedcount</title>
      <link>https://community.qlik.com/t5/QlikView/Using-If-and-getselectedcount/m-p/1312784#M838512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then you want&lt;/P&gt;&lt;P&gt;=if(getselectedcount(CostCenterCode)&amp;gt;0,'Test','Space')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The way you have it written now is less than 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 May 2017 20:40:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-If-and-getselectedcount/m-p/1312784#M838512</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-09T20:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: Using If and getselectedcount</title>
      <link>https://community.qlik.com/t5/QlikView/Using-If-and-getselectedcount/m-p/1312785#M838513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/162686_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 May 2017 20:42:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-If-and-getselectedcount/m-p/1312785#M838513</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-09T20:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using If and getselectedcount</title>
      <link>https://community.qlik.com/t5/QlikView/Using-If-and-getselectedcount/m-p/1312786#M838514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then you need to re-write the code as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(getselectedcount(CostCenterCode) &amp;gt; 0, 'Test', 'Space')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 May 2017 20:44:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-If-and-getselectedcount/m-p/1312786#M838514</guid>
      <dc:creator>trdandamudi</dc:creator>
      <dc:date>2017-05-09T20:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using If and getselectedcount</title>
      <link>https://community.qlik.com/t5/QlikView/Using-If-and-getselectedcount/m-p/1312787#M838517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's because CostCenterCode and CostCenterName are 2 difference fields.&amp;nbsp; If you want to check both you could do something like&lt;/P&gt;&lt;P&gt;=if(getselectedcount(CostCenterName)+getselectedcount(CostCenterCode)&amp;gt;0,'Test','Space')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 May 2017 20:59:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-If-and-getselectedcount/m-p/1312787#M838517</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-09T20:59:35Z</dc:date>
    </item>
  </channel>
</rss>

