<?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 How to dynamically ignore set modifiers if no selections have been made for those pseudo dimensions in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-dynamically-ignore-set-modifiers-if-no-selections-have/m-p/2017302#M84009</link>
    <description>&lt;P class="p1"&gt;Within an app I want to add the possibility to compare results based on different filter sets, where each filter set exists of multiple dimensions. However I keep facing the same issue: the result only includes facts which contain values for the dimensions in the set modifier. The result is that I am missing data in my aggregations.&lt;/P&gt;
&lt;P class="p1"&gt;I’ll try to make it more tangible with an example.&lt;/P&gt;
&lt;P class="p1"&gt;Suppose there are three dimensions:&lt;/P&gt;
&lt;UL class="ul1"&gt;
&lt;LI class="li1"&gt;Holding&lt;/LI&gt;
&lt;LI class="li1"&gt;Company&lt;/LI&gt;
&lt;LI class="li1"&gt;Service&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="p1"&gt;with the following associations:&lt;/P&gt;
&lt;UL class="ul1"&gt;
&lt;LI class="li1"&gt;Facts - Company- Holding&lt;/LI&gt;
&lt;LI class="li1"&gt;Facts - Service&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="p1"&gt;Keep in mind that:&lt;/P&gt;
&lt;UL class="ul1"&gt;
&lt;LI class="li1"&gt;not all facts contain a service&lt;/LI&gt;
&lt;LI class="li1"&gt;not every company has a holding&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="p1"&gt;To get the desired cross section of data, I added for each dimension a table with a copy of all distinct values of that dimension and gave the fields a different name to prevent associations. Thus in this example I actually have he following tables:&lt;/P&gt;
&lt;UL class="ul1"&gt;
&lt;LI class="li1"&gt;Holding&lt;/LI&gt;
&lt;LI class="li1"&gt;Company&lt;/LI&gt;
&lt;LI class="li1"&gt;Services&lt;/LI&gt;
&lt;LI class="li1"&gt;Facts&lt;/LI&gt;
&lt;LI class="li1"&gt;[Pseudo Holding]&lt;/LI&gt;
&lt;LI class="li1"&gt;[Pseudo Company]&lt;/LI&gt;
&lt;LI class="li1"&gt;[Pseudo Service]&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="p1"&gt;with the associations:&lt;/P&gt;
&lt;UL class="ul1"&gt;
&lt;LI class="li1"&gt;Facts - Company- Holding&lt;/LI&gt;
&lt;LI class="li1"&gt;Facts - Service&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="p1"&gt;Use for example the following set analysis:&lt;/P&gt;
&lt;P class="p1"&gt;{1&amp;lt; Holding = P([Pseudo Holding]), Company = P([Pseudo Company]), Service = P([Pseudo Service]) &amp;gt;}Sum(Revenue)&lt;/P&gt;
&lt;P class="p1"&gt;ignores all revenue for companies without a holding and facts without a service. Is there a way to ignore set modifiers if no values have been selected for the pseudo dimension dynamically (e.g. Service=)? All my attempts have failed so far. I tried adding conditions, variables, multiple set modifiers, intersections, GetSelectedFields(), GetSelectedCount…&lt;/P&gt;</description>
    <pubDate>Fri, 16 Dec 2022 07:32:59 GMT</pubDate>
    <dc:creator>AntonBakker</dc:creator>
    <dc:date>2022-12-16T07:32:59Z</dc:date>
    <item>
      <title>How to dynamically ignore set modifiers if no selections have been made for those pseudo dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-dynamically-ignore-set-modifiers-if-no-selections-have/m-p/2017302#M84009</link>
      <description>&lt;P class="p1"&gt;Within an app I want to add the possibility to compare results based on different filter sets, where each filter set exists of multiple dimensions. However I keep facing the same issue: the result only includes facts which contain values for the dimensions in the set modifier. The result is that I am missing data in my aggregations.&lt;/P&gt;
&lt;P class="p1"&gt;I’ll try to make it more tangible with an example.&lt;/P&gt;
&lt;P class="p1"&gt;Suppose there are three dimensions:&lt;/P&gt;
&lt;UL class="ul1"&gt;
&lt;LI class="li1"&gt;Holding&lt;/LI&gt;
&lt;LI class="li1"&gt;Company&lt;/LI&gt;
&lt;LI class="li1"&gt;Service&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="p1"&gt;with the following associations:&lt;/P&gt;
&lt;UL class="ul1"&gt;
&lt;LI class="li1"&gt;Facts - Company- Holding&lt;/LI&gt;
&lt;LI class="li1"&gt;Facts - Service&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="p1"&gt;Keep in mind that:&lt;/P&gt;
&lt;UL class="ul1"&gt;
&lt;LI class="li1"&gt;not all facts contain a service&lt;/LI&gt;
&lt;LI class="li1"&gt;not every company has a holding&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="p1"&gt;To get the desired cross section of data, I added for each dimension a table with a copy of all distinct values of that dimension and gave the fields a different name to prevent associations. Thus in this example I actually have he following tables:&lt;/P&gt;
&lt;UL class="ul1"&gt;
&lt;LI class="li1"&gt;Holding&lt;/LI&gt;
&lt;LI class="li1"&gt;Company&lt;/LI&gt;
&lt;LI class="li1"&gt;Services&lt;/LI&gt;
&lt;LI class="li1"&gt;Facts&lt;/LI&gt;
&lt;LI class="li1"&gt;[Pseudo Holding]&lt;/LI&gt;
&lt;LI class="li1"&gt;[Pseudo Company]&lt;/LI&gt;
&lt;LI class="li1"&gt;[Pseudo Service]&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="p1"&gt;with the associations:&lt;/P&gt;
&lt;UL class="ul1"&gt;
&lt;LI class="li1"&gt;Facts - Company- Holding&lt;/LI&gt;
&lt;LI class="li1"&gt;Facts - Service&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="p1"&gt;Use for example the following set analysis:&lt;/P&gt;
&lt;P class="p1"&gt;{1&amp;lt; Holding = P([Pseudo Holding]), Company = P([Pseudo Company]), Service = P([Pseudo Service]) &amp;gt;}Sum(Revenue)&lt;/P&gt;
&lt;P class="p1"&gt;ignores all revenue for companies without a holding and facts without a service. Is there a way to ignore set modifiers if no values have been selected for the pseudo dimension dynamically (e.g. Service=)? All my attempts have failed so far. I tried adding conditions, variables, multiple set modifiers, intersections, GetSelectedFields(), GetSelectedCount…&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 07:32:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-dynamically-ignore-set-modifiers-if-no-selections-have/m-p/2017302#M84009</guid>
      <dc:creator>AntonBakker</dc:creator>
      <dc:date>2022-12-16T07:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically ignore set modifiers if no selections have been made for those pseudo dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-dynamically-ignore-set-modifiers-if-no-selections-have/m-p/2017656#M84036</link>
      <description>&lt;P&gt;Found the solution in this artikel:&amp;nbsp;&lt;A title="How to pass IF statement inside Set Analysis modifiers?" href="https://community.qlik.com/t5/App-Development/How-to-pass-IF-statement-inside-Set-Analysis-modifiers/td-p/110899" target="_self"&gt;How to pass IF statement inside Set Analysis modifiers?&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When using an if statement, you have to wrap the then and else statement in single quotes and it works. Thus:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;{1&amp;lt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;$(=if(&lt;/SPAN&gt;&lt;SPAN&gt;GetSelectedCount([Pseudo Holding]&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;, 'Holding =','Holding = P([Pseudo Holding])')),&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;$(=if(&lt;/SPAN&gt;&lt;SPAN&gt;GetSelectedCount([Pseudo Company]&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;, 'Company =','Company = P([Pseudo Company])')),&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;$(=if(&lt;/SPAN&gt;&lt;SPAN&gt;GetSelectedCount([Pseudo Service]&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;, 'Service =','Service = P([Pseudo Service])'))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt; &amp;gt;}Sum(Revenue&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Dec 2022 19:19:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-dynamically-ignore-set-modifiers-if-no-selections-have/m-p/2017656#M84036</guid>
      <dc:creator>AntonBakker</dc:creator>
      <dc:date>2022-12-17T19:19:21Z</dc:date>
    </item>
  </channel>
</rss>

