<?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: Set Analysis on complex expression in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-Analysis-on-complex-expression/m-p/1732212#M55890</link>
    <description>&lt;P&gt;So, are you saying that in addition to the above expression are you also looking to add set analysis for fips?&lt;/P&gt;</description>
    <pubDate>Thu, 30 Jul 2020 17:23:42 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2020-07-30T17:23:42Z</dc:date>
    <item>
      <title>Set Analysis on complex expression</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-on-complex-expression/m-p/1732146#M55885</link>
      <description>&lt;P&gt;Hi all, I created an app linked to the NYT GitHub covid data by county, which shows total cases and deaths per day.&amp;nbsp; I created a couple combo charts with modifiers so that I could figure out how to get daily case totals and then a 7-day moving average of daily case totals.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to use set analysis to chart specific fips codes so I can plot multiple counties' 7-day averages on one chart.&amp;nbsp; Once I used the modifiers for difference and then moving average, I copied and pasted the "output expressions" to create new charts with them.&amp;nbsp; The 7-day average for this data is the expression below:&lt;/P&gt;&lt;P&gt;RangeSum(Above(If(Count([$(=Replace(GetObjectField(0),']',']]'))]) &amp;gt; 0, (　If(Count([$(=Replace(GetObjectField(0),']',']]'))]) &amp;gt; 0, (　Sum(cases)　) + Sum({1&amp;lt;[$(=Replace(GetObjectField(0),']',']]'))]={"&amp;gt;=$(=Min([$(=Replace(GetObjectField(0),']',']]'))]))&amp;lt;=$(=Max([$(=Replace(GetObjectField(0),']',']]'))]))"}&amp;gt;}0), 0) - Above(If(Count([$(=Replace(GetObjectField(0),']',']]'))]) &amp;gt; 0, (　Sum(cases)　) + Sum({1&amp;lt;[$(=Replace(GetObjectField(0),']',']]'))]={"&amp;gt;=$(=Min([$(=Replace(GetObjectField(0),']',']]'))]))&amp;lt;=$(=Max([$(=Replace(GetObjectField(0),']',']]'))]))"}&amp;gt;}0), 0))　) + Sum({1&amp;lt;[$(=Replace(GetObjectField(0),']',']]'))]={"&amp;gt;=$(=Min([$(=Replace(GetObjectField(0),']',']]'))]))&amp;lt;=$(=Max([$(=Replace(GetObjectField(0),']',']]'))]))"}&amp;gt;}0), 0), 0, 7)) / RangeMin(7, RowNo())&lt;/P&gt;&lt;P&gt;The field I want to use set analysis for is "fips" and an example fips code I want to use is "24031".&amp;nbsp; Let me know if you have any ideas how to use set analysis on this expression!&amp;nbsp; I have tried nesting it in different locations in the expression to no avail.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 21:08:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-on-complex-expression/m-p/1732146#M55885</guid>
      <dc:creator>eruppel</dc:creator>
      <dc:date>2021-12-20T21:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis on complex expression</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-on-complex-expression/m-p/1732212#M55890</link>
      <description>&lt;P&gt;So, are you saying that in addition to the above expression are you also looking to add set analysis for fips?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2020 17:23:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-on-complex-expression/m-p/1732212#M55890</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-07-30T17:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis on complex expression</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-on-complex-expression/m-p/1732225#M55891</link>
      <description>&lt;P&gt;Yes, that expression is what I would like to use as the sum, and I want to separate it by counties (that is, by fips codes).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The set analysis would look something like this in a simpler expression:&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;fips={'&lt;SPAN&gt;24031'&lt;/SPAN&gt;}&amp;gt;} [7-day average cases])&lt;/P&gt;&lt;P&gt;But the 7-day case average is the entire complex expression above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2020 18:16:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-on-complex-expression/m-p/1732225#M55891</guid>
      <dc:creator>eruppel</dc:creator>
      <dc:date>2020-07-30T18:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis on complex expression</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-on-complex-expression/m-p/1734689#M56116</link>
      <description>&lt;P&gt;Hi, any ideas on creating this set expression?&amp;nbsp;&lt;BR /&gt;Or perhaps a way to make a “difference” and “moving average” field via the load script for a field that reports totals through xx date? That would potentially be easier to apply set analysis; I just don’t know how to do it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 04:20:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-on-complex-expression/m-p/1734689#M56116</guid>
      <dc:creator>eruppel</dc:creator>
      <dc:date>2020-08-11T04:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis on complex expression</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-on-complex-expression/m-p/1734752#M56126</link>
      <description>&lt;P&gt;Would you be able to share a sample where we can see the issue?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 10:02:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-on-complex-expression/m-p/1734752#M56126</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-08-11T10:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis on complex expression</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-on-complex-expression/m-p/1735009#M56151</link>
      <description>&lt;DIV class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;Yes, please see the attached qvf.&amp;nbsp; I'm trying to add the set analysis to the two charts on the third sheet, Counties Daily, using the fips codes in the table on that sheet (when default bookmark is applied).&amp;nbsp; Does that help show what I'm trying to see?&amp;nbsp; The two fields are &lt;EM&gt;cases&lt;/EM&gt; and &lt;EM&gt;deaths&lt;/EM&gt;&amp;nbsp;that are being summed by fips code.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 11 Aug 2020 21:07:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-on-complex-expression/m-p/1735009#M56151</guid>
      <dc:creator>eruppel</dc:creator>
      <dc:date>2020-08-11T21:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis on complex expression</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-on-complex-expression/m-p/1735196#M56170</link>
      <description>&lt;P&gt;Is this what you want?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 806px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/38896i71C7F1B95E17E23F/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;RangeSum(Above(If(Count({$&amp;lt;fips={'24031'}&amp;gt;}[$(=Replace(GetObjectField(0),']',']]'))])&amp;gt;0,
(　If(Count({$&amp;lt;fips={'24031'}&amp;gt;}[$(=Replace(GetObjectField(0),']',']]'))])&amp;gt;0,
(　Sum({$&amp;lt;fips={'24031'}&amp;gt;}deaths)　)+Sum({1&amp;lt;fips={'24031'}, [$(=Replace(GetObjectField(0),']',']]'))]={"&amp;gt;=$(=Min([$(=Replace(GetObjectField(0),']',']]'))]))&amp;lt;=$(=Max([$(=Replace(GetObjectField(0),']',']]'))]))"}&amp;gt;}0),0)-Above(If(Count([$(=Replace(GetObjectField(0),']',']]'))])&amp;gt;0,
(　Sum({$&amp;lt;fips={'24031'}&amp;gt;}deaths)　)+Sum({1&amp;lt;fips={'24031'}, [$(=Replace(GetObjectField(0),']',']]'))]={"&amp;gt;=$(=Min([$(=Replace(GetObjectField(0),']',']]'))]))&amp;lt;=$(=Max([$(=Replace(GetObjectField(0),']',']]'))]))"}&amp;gt;}0),0))　)+Sum({1&amp;lt;[$(=Replace(GetObjectField(0),']',']]'))]={"&amp;gt;=$(=Min([$(=Replace(GetObjectField(0),']',']]'))]))&amp;lt;=$(=Max([$(=Replace(GetObjectField(0),']',']]'))]))"}&amp;gt;}0),0),0,7))
/RangeMin(7,RowNo())&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 11:09:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-on-complex-expression/m-p/1735196#M56170</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-08-12T11:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis on complex expression</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-on-complex-expression/m-p/1735427#M56181</link>
      <description>&lt;P&gt;That's perfect, thank you so much!&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 01:46:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-on-complex-expression/m-p/1735427#M56181</guid>
      <dc:creator>eruppel</dc:creator>
      <dc:date>2020-08-13T01:46:14Z</dc:date>
    </item>
  </channel>
</rss>

