<?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: Need help with nested IFs in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Need-help-with-nested-IFs/m-p/1748285#M57528</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/85019"&gt;@User13&lt;/a&gt;&amp;nbsp; use distinct keyword in concat function.. updated expression&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 00:11:39 GMT</pubDate>
    <dc:creator>Kushal_Chawda</dc:creator>
    <dc:date>2020-09-30T00:11:39Z</dc:date>
    <item>
      <title>Need help with nested IFs</title>
      <link>https://community.qlik.com/t5/App-Development/Need-help-with-nested-IFs/m-p/1748199#M57520</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to filter values based on selection from a drop down list in a way that if employee "B" is selected from dropdown list, table should show employee "B", his supervisor "A" and his direct reportees "C" and "D"&lt;/P&gt;&lt;P&gt;= IF([Supervisor ]='$(=GetFieldSelections(list))' OR [Employee]='$(=GetFieldSelections(list))'&lt;BR /&gt;OR [Employee]= (IF([Employee]='$(=GetFieldSelections(list))',[Supervisor ])),[Employee])&lt;/P&gt;&lt;P&gt;This expression is returning employee "B" and his reportees but not his supervisor&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looks like there is some issue in this part&lt;/P&gt;&lt;P&gt;[Employee]= (IF([Employee]='$(=GetFieldSelections(list))',[Supervisor ]))&lt;/P&gt;&lt;P&gt;Can you please help to resolve this&lt;/P&gt;&lt;TABLE width="352"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="245"&gt;Employee&lt;/TD&gt;&lt;TD width="107"&gt;Supervisor&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;E&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:21:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Need-help-with-nested-IFs/m-p/1748199#M57520</guid>
      <dc:creator>User13</dc:creator>
      <dc:date>2024-11-16T01:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with nested IFs</title>
      <link>https://community.qlik.com/t5/App-Development/Need-help-with-nested-IFs/m-p/1748255#M57526</link>
      <description>&lt;P&gt;Assuming you are building a chart,&lt;BR /&gt;&lt;BR /&gt;this gets you all the subordinates:&lt;BR /&gt;= count(DISTINCT {&amp;lt;Employee=, Supervisor={'$(=only(Employee))'}&amp;gt;}Employee)&lt;/P&gt;&lt;P&gt;this gets the supervisor:&lt;BR /&gt;= count(DISTINCT {&amp;lt;Employee=p({&amp;lt;Employee={'$(=only(Employee))'}&amp;gt;} Supervisor)&amp;gt;}Employee)&lt;/P&gt;&lt;P&gt;you can of course extrapolate from this using concat, etc..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hope that helps&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:38:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Need-help-with-nested-IFs/m-p/1748255#M57526</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-09-29T20:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with nested IFs</title>
      <link>https://community.qlik.com/t5/App-Development/Need-help-with-nested-IFs/m-p/1748276#M57527</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/85019"&gt;@User13&lt;/a&gt;&amp;nbsp; try below&lt;/P&gt;&lt;P&gt;Create variable &lt;STRONG&gt;vEmployees&lt;/STRONG&gt; on frond end with below expression&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;=Concat(distinct chr(39)&amp;amp;Employee&amp;amp;chr(39),',')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then create below expression. Note that Employee and supervisors&amp;nbsp; both should present in dimensions&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;=Count({&amp;lt;Employee+=p({1&amp;lt;Supervisor={$(vEmployees)}&amp;gt;}Employee)&amp;gt;}Employee)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also use the set in actual expression. Let's say you have measure as Sum(Salary) then use below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;=sum({&amp;lt;Employee+=p({1&amp;lt;Supervisor={$(vEmployees)}&amp;gt;}Employee)&amp;gt;}Salary)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:10:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Need-help-with-nested-IFs/m-p/1748276#M57527</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-09-30T00:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with nested IFs</title>
      <link>https://community.qlik.com/t5/App-Development/Need-help-with-nested-IFs/m-p/1748285#M57528</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/85019"&gt;@User13&lt;/a&gt;&amp;nbsp; use distinct keyword in concat function.. updated expression&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:11:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Need-help-with-nested-IFs/m-p/1748285#M57528</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-09-30T00:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with nested IFs</title>
      <link>https://community.qlik.com/t5/App-Development/Need-help-with-nested-IFs/m-p/1748350#M57535</link>
      <description>&lt;P&gt;Hi Edwin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;I am working on Org chart and trying to create functionality to search employees by name using dropdown list. I think we have to perform this in dimension field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 07:47:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Need-help-with-nested-IFs/m-p/1748350#M57535</guid>
      <dc:creator>User13</dc:creator>
      <dc:date>2020-09-30T07:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with nested IFs</title>
      <link>https://community.qlik.com/t5/App-Development/Need-help-with-nested-IFs/m-p/1748351#M57536</link>
      <description>&lt;P&gt;Hi Kush,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;I am working on Org chart and trying to create functionality to search employees by name using dropdown list. I think we have to perform this in dimension field.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 07:48:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Need-help-with-nested-IFs/m-p/1748351#M57536</guid>
      <dc:creator>User13</dc:creator>
      <dc:date>2020-09-30T07:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with nested IFs</title>
      <link>https://community.qlik.com/t5/App-Development/Need-help-with-nested-IFs/m-p/1748388#M57539</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/85019"&gt;@User13&lt;/a&gt;&amp;nbsp; As I mentioned , You can add the Dimensions in your chart (Employee &amp;amp; Supervisor) and then&amp;nbsp; add the measure with set as I mentioned. You can provide filter of Employee to select any value.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 09:46:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Need-help-with-nested-IFs/m-p/1748388#M57539</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-09-30T09:46:44Z</dc:date>
    </item>
  </channel>
</rss>

