<?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 Set an expression result as a filter for end user in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-an-expression-result-as-a-filter-for-end-user/m-p/2121349#M91302</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm trying to give the end user the possibility to filter on an expression:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if(OrderStatus='Makulerad',0, If ((sum(confirmed_quantity) &amp;lt; sum(ordered_quantity)), (sum(confirmed_quantity) - sum(delivered_quantity)), (sum(ordered_quantity) - sum(delivered_quantity))))&lt;/P&gt;
&lt;P&gt;They want to be able to filter on everything over 0, everything under 0 and 0 which works when using smart search &amp;gt;0, &amp;lt;0, 0 and so on.&lt;/P&gt;
&lt;P&gt;I've tried putting this in an calculated dimension with aggr and that sort of works but I need to aggr over a lot of dimensions so it's not a good solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've also tried aggregation in the script outside the fact table and then join the results to the fact table on OrderId.&lt;/P&gt;
&lt;P&gt;But I get an error:&lt;/P&gt;
&lt;DIV class="headline edc_error"&gt;The following error occurred:&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;Error in expression: Nested aggregation not allowed:&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;SumOverUnder:&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;Load [Supplier Order ID],&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;sum(if(OrderStatus='Makulerad',0, If ((sum(confirmed_quantity) &amp;lt; sum(ordered_quantity)), (sum(confirmed_quantity) - sum(delivered_quantity)), (sum(ordered_quantity) - sum(delivered_quantity))))) as OverUnderDelSum&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;Resident Facts group by [Supplier Order ID];&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas?&lt;/P&gt;</description>
    <pubDate>Fri, 22 Sep 2023 11:17:47 GMT</pubDate>
    <dc:creator>qlikster</dc:creator>
    <dc:date>2023-09-22T11:17:47Z</dc:date>
    <item>
      <title>Set an expression result as a filter for end user</title>
      <link>https://community.qlik.com/t5/App-Development/Set-an-expression-result-as-a-filter-for-end-user/m-p/2121349#M91302</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm trying to give the end user the possibility to filter on an expression:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if(OrderStatus='Makulerad',0, If ((sum(confirmed_quantity) &amp;lt; sum(ordered_quantity)), (sum(confirmed_quantity) - sum(delivered_quantity)), (sum(ordered_quantity) - sum(delivered_quantity))))&lt;/P&gt;
&lt;P&gt;They want to be able to filter on everything over 0, everything under 0 and 0 which works when using smart search &amp;gt;0, &amp;lt;0, 0 and so on.&lt;/P&gt;
&lt;P&gt;I've tried putting this in an calculated dimension with aggr and that sort of works but I need to aggr over a lot of dimensions so it's not a good solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've also tried aggregation in the script outside the fact table and then join the results to the fact table on OrderId.&lt;/P&gt;
&lt;P&gt;But I get an error:&lt;/P&gt;
&lt;DIV class="headline edc_error"&gt;The following error occurred:&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;Error in expression: Nested aggregation not allowed:&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;SumOverUnder:&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;Load [Supplier Order ID],&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;sum(if(OrderStatus='Makulerad',0, If ((sum(confirmed_quantity) &amp;lt; sum(ordered_quantity)), (sum(confirmed_quantity) - sum(delivered_quantity)), (sum(ordered_quantity) - sum(delivered_quantity))))) as OverUnderDelSum&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;Resident Facts group by [Supplier Order ID];&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 11:17:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-an-expression-result-as-a-filter-for-end-user/m-p/2121349#M91302</guid>
      <dc:creator>qlikster</dc:creator>
      <dc:date>2023-09-22T11:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: Set an expression result as a filter for end user</title>
      <link>https://community.qlik.com/t5/App-Development/Set-an-expression-result-as-a-filter-for-end-user/m-p/2121622#M91324</link>
      <description>&lt;P&gt;SumOverUnder:&lt;BR /&gt;Load [Supplier Order ID],&lt;BR /&gt;if(OrderStatus='Makulerad',0, &lt;BR /&gt;If ((sum(confirmed_quantity) &amp;lt; sum(ordered_quantity)), (sum(confirmed_quantity) - sum(delivered_quantity)), (sum(ordered_quantity) - sum(delivered_quantity)))) as OverUnderDelSum&lt;BR /&gt;Resident Facts group by [Supplier Order ID];&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;or&lt;/P&gt;
&lt;P&gt;SumOverUnder:&lt;BR /&gt;load [Supplier Order ID],&lt;BR /&gt;if(OrderStatus='Makulerad',0, &lt;BR /&gt;If (cq &amp;lt; oq, cq - dq,oq- dq) as OverUnderDelSum&lt;BR /&gt;;&lt;BR /&gt;Load [Supplier Order ID],&lt;BR /&gt;sum(confirmed_quantity) as cq,&lt;BR /&gt;sum(ordered_quantity) as oq,&lt;BR /&gt;sum(delivered_quantity) as dq&lt;/P&gt;
&lt;P&gt;Resident Facts group by [Supplier Order ID];&lt;/P&gt;</description>
      <pubDate>Sat, 23 Sep 2023 12:37:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-an-expression-result-as-a-filter-for-end-user/m-p/2121622#M91324</guid>
      <dc:creator>anat</dc:creator>
      <dc:date>2023-09-23T12:37:54Z</dc:date>
    </item>
  </channel>
</rss>

