<?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 analysis in AAI formulas in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Set-analysis-in-AAI-formulas/m-p/105251#M14252</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as my first post ever on the Qlik Community, I was wondering whether and how set modifiers (as well as the "total" qualifier) can be used in conjunction with the AAI formulas (e.g. R.ScriptAggr). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Image, for instance, a barchart using [Field 1] as a dimension and a measure where this dimension needs to be ignored - e.g. to display a % of total:&lt;/P&gt;&lt;P&gt;sum([Field X]) / sum([Field X] total &amp;lt;[Field 1]&amp;gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The numerator and denominator are hence essentially the same, only that the latter ignores the barchart's dimension. The equivalent of the numerator, using AAI, would be something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;R.ScriptAggrEx( 'N',&lt;/P&gt;&lt;P&gt;'sum(q$FieldX, na.rm = TRUE);'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,num("Field X") as FieldX&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;However, how could one specify the 'total' in the R.Scriptxxx formulas? Or is it simply not possible (yet), and if so, can we expect such feature in the future?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 16 Nov 2024 07:47:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T07:47:31Z</dc:date>
    <item>
      <title>Set analysis in AAI formulas</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Set-analysis-in-AAI-formulas/m-p/105251#M14252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as my first post ever on the Qlik Community, I was wondering whether and how set modifiers (as well as the "total" qualifier) can be used in conjunction with the AAI formulas (e.g. R.ScriptAggr). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Image, for instance, a barchart using [Field 1] as a dimension and a measure where this dimension needs to be ignored - e.g. to display a % of total:&lt;/P&gt;&lt;P&gt;sum([Field X]) / sum([Field X] total &amp;lt;[Field 1]&amp;gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The numerator and denominator are hence essentially the same, only that the latter ignores the barchart's dimension. The equivalent of the numerator, using AAI, would be something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;R.ScriptAggrEx( 'N',&lt;/P&gt;&lt;P&gt;'sum(q$FieldX, na.rm = TRUE);'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,num("Field X") as FieldX&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;However, how could one specify the 'total' in the R.Scriptxxx formulas? Or is it simply not possible (yet), and if so, can we expect such feature in the future?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Nov 2024 07:47:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Set-analysis-in-AAI-formulas/m-p/105251#M14252</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T07:47:31Z</dc:date>
    </item>
  </channel>
</rss>

