<?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 GetSelectedCount() not working with IF function on dimension in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/GetSelectedCount-not-working-with-IF-function-on-dimension/m-p/2030496#M84874</link>
    <description>&lt;P&gt;I am using the following formula to identify whether or not to display some visualizations. I shall call it Formula 1:&lt;/P&gt;
&lt;P&gt;((GetSelectedCount(DateLinkDate) + GetSelectedCount(LinkDate) + GetSelectedCount(YearLinkDate) + GetSelectedCount(MonthYearLinkDate) + GetSelectedCount(FinYearLinkDate)) &amp;gt; 0)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is working fine if I select specific values of one of the mentioned dimensions e.g. FinYearLinkDate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However if i have an IF() statement around say FinYearLinkDate&amp;nbsp; in another visualization, e.g.&lt;/P&gt;
&lt;P&gt;=if(MonthYearLinkDate&amp;gt;'31/03/2019',if(MonthYearLinkDate &amp;lt;=MonthEnd(Addmonths(today(),-1)),FinYearLinkDate))&lt;/P&gt;
&lt;P&gt;and I use this visualization to select the FinYearLinkDate, Formula 1 evaluates to 0 and no visualization displays.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone know why this is happening?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sarah&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jan 2023 17:09:04 GMT</pubDate>
    <dc:creator>Sa_Rah</dc:creator>
    <dc:date>2023-01-26T17:09:04Z</dc:date>
    <item>
      <title>GetSelectedCount() not working with IF function on dimension</title>
      <link>https://community.qlik.com/t5/App-Development/GetSelectedCount-not-working-with-IF-function-on-dimension/m-p/2030496#M84874</link>
      <description>&lt;P&gt;I am using the following formula to identify whether or not to display some visualizations. I shall call it Formula 1:&lt;/P&gt;
&lt;P&gt;((GetSelectedCount(DateLinkDate) + GetSelectedCount(LinkDate) + GetSelectedCount(YearLinkDate) + GetSelectedCount(MonthYearLinkDate) + GetSelectedCount(FinYearLinkDate)) &amp;gt; 0)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is working fine if I select specific values of one of the mentioned dimensions e.g. FinYearLinkDate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However if i have an IF() statement around say FinYearLinkDate&amp;nbsp; in another visualization, e.g.&lt;/P&gt;
&lt;P&gt;=if(MonthYearLinkDate&amp;gt;'31/03/2019',if(MonthYearLinkDate &amp;lt;=MonthEnd(Addmonths(today(),-1)),FinYearLinkDate))&lt;/P&gt;
&lt;P&gt;and I use this visualization to select the FinYearLinkDate, Formula 1 evaluates to 0 and no visualization displays.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone know why this is happening?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sarah&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 17:09:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/GetSelectedCount-not-working-with-IF-function-on-dimension/m-p/2030496#M84874</guid>
      <dc:creator>Sa_Rah</dc:creator>
      <dc:date>2023-01-26T17:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: GetSelectedCount() not working with IF function on dimension</title>
      <link>https://community.qlik.com/t5/App-Development/GetSelectedCount-not-working-with-IF-function-on-dimension/m-p/2030691#M84891</link>
      <description>&lt;P&gt;HI,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try below,&lt;/P&gt;
&lt;P&gt;Since there is no dependency , move your calculated Dim Exp to script as a New filed and use it in fist expression.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if(MonthYearLinkDate&amp;gt;'31/03/2019' and MonthYearLinkDate &amp;lt;=MonthEnd(Addmonths(today(),-1)) ,FinYearLinkDate) As NewMonthYearLinkDate,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;((GetSelectedCount(DateLinkDate) + GetSelectedCount(LinkDate) + GetSelectedCount(YearLinkDate) + GetSelectedCount(MonthYearLinkDate) + GetSelectedCount(&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;NewMonthYearLinkDate&lt;/STRONG&gt;&lt;/FONT&gt;)+GetSelectedCount(FinYearLinkDate)) &amp;gt; 0)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sasi&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 07:17:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/GetSelectedCount-not-working-with-IF-function-on-dimension/m-p/2030691#M84891</guid>
      <dc:creator>sasikanth</dc:creator>
      <dc:date>2023-01-27T07:17:10Z</dc:date>
    </item>
  </channel>
</rss>

