<?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: Issue with Overlapping dimensions in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Issue-with-Overlapping-dimensions/m-p/2508207#M104462</link>
    <description>&lt;P&gt;Thanks for the replies. This also worked and might be the best solution to the problem&lt;/P&gt;
&lt;P&gt;Sum(Aggr(&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Sum({&amp;lt;R03_MonthsAgo&amp;gt;} Sales),&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; R03_MonthsAgo, MonthsAgo&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I can add the variables like this, for example last 12 months of R06 data&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Sum(Aggr(&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt;$(vD.R06_YM0_11)&amp;gt;} Sales),&lt;/P&gt;
&lt;P&gt;R06_MonthsAgo, MonthsAgo))&lt;/P&gt;</description>
    <pubDate>Tue, 04 Mar 2025 11:26:00 GMT</pubDate>
    <dc:creator>QlikWilliam</dc:creator>
    <dc:date>2025-03-04T11:26:00Z</dc:date>
    <item>
      <title>Issue with Overlapping dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/Issue-with-Overlapping-dimensions/m-p/2507823#M104409</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;I have an issue and im not sure there is a solution except to rework the data model.&lt;/P&gt;
&lt;P&gt;Im trying to create a variable called "R03_YM0_1" that will calculate the rolling 3 month value for the current month (MonthsAgo=0) and previous month (MonthsAgo=1) and sum this in a KPI.&lt;/P&gt;
&lt;P&gt;The variable is defined in the script like this&lt;/P&gt;
&lt;P&gt;R03_YM0_1|R03 1 to 2 months back from current YearMonth|R03_MonthsAgo={"&amp;lt;=@(=min(MonthsAgo)+1)&amp;gt;=@(=min(MonthsAgo)+0)"}&lt;/P&gt;
&lt;DIV&gt;In Qlik Sense the variable evaluates to this:&lt;/DIV&gt;
&lt;DIV&gt;Sum( {&amp;lt;R03_MonthsAgo={"&amp;lt;=1&amp;gt;=0"}&amp;gt;} Sales)&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Where each field value in the field "R03_MonthsAgo" is associated to 3 field values of another field called "MonthsAgo". For Instance&lt;BR /&gt;R03_MonthsAgo = 0 is associated with MonthsAgo=0,1,2&lt;BR /&gt;and&lt;BR /&gt;R03_MonthsAgo = 1 is associated with MonthsAgo=1,2,3&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I then have Sales for each MonthsAgo value.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;With the expression
&lt;DIV&gt;Sum( {&amp;lt;R03_MonthsAgo={"&amp;lt;=1&amp;gt;=0"}&amp;gt;} Sales)&lt;/DIV&gt;
it does not evaluate to the same as the expression Sum( {&amp;lt;R03_MonthsAgo={'0'}&amp;gt;} Sales) + Sum( {&amp;lt;R03_MonthsAgo={'1'}&amp;gt;} Sales) in terms of sales.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;This is because the expression
&lt;DIV&gt;Sum( {&amp;lt;R03_MonthsAgo={"&amp;lt;=1&amp;gt;=0"}&amp;gt;} Sales)&lt;/DIV&gt;
does not double count overlapping values. That is it calculates sales for MonthsAgo=0,1,2,3 but that is not what I want. I want it to double count the MonthsAgo values 1 and 2 since these are overlapping.&lt;BR /&gt;&lt;BR /&gt;Is there another solution to this? I can write&amp;nbsp;&lt;BR /&gt;Sum( {&amp;lt;R03_MonthsAgo={'0'}&amp;gt;} Sales) + Sum( {&amp;lt;R03_MonthsAgo={'1'}&amp;gt;} Sales)&lt;BR /&gt;and I will get the correct value in the KPI, but this is troublesome to write out each month like this.&lt;/DIV&gt;</description>
      <pubDate>Fri, 28 Feb 2025 13:47:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issue-with-Overlapping-dimensions/m-p/2507823#M104409</guid>
      <dc:creator>QlikWilliam</dc:creator>
      <dc:date>2025-02-28T13:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Overlapping dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/Issue-with-Overlapping-dimensions/m-p/2507834#M104411</link>
      <description>&lt;P&gt;Hi William,&lt;/P&gt;
&lt;P&gt;I think the only way to make Qlik double count these numbers is to use a sum of two aggregations. Any other Set Analysis solution would naturally remove the duplication.&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2025 14:55:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issue-with-Overlapping-dimensions/m-p/2507834#M104411</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2025-02-28T14:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Overlapping dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/Issue-with-Overlapping-dimensions/m-p/2507842#M104413</link>
      <description>&lt;P&gt;Try this&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt;MonthsAgo={0,1,2}&amp;gt;} Sales) + Sum({&amp;lt;MonthsAgo={1,2,3}&amp;gt;} Sales)&lt;/P&gt;
&lt;P&gt;Or&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sum(Aggr(&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Sum({&amp;lt;R03_MonthsAgo&amp;gt;} Sales),&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; R03_MonthsAgo, MonthsAgo&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2025 16:13:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issue-with-Overlapping-dimensions/m-p/2507842#M104413</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2025-02-28T16:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Overlapping dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/Issue-with-Overlapping-dimensions/m-p/2508207#M104462</link>
      <description>&lt;P&gt;Thanks for the replies. This also worked and might be the best solution to the problem&lt;/P&gt;
&lt;P&gt;Sum(Aggr(&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Sum({&amp;lt;R03_MonthsAgo&amp;gt;} Sales),&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; R03_MonthsAgo, MonthsAgo&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I can add the variables like this, for example last 12 months of R06 data&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Sum(Aggr(&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt;$(vD.R06_YM0_11)&amp;gt;} Sales),&lt;/P&gt;
&lt;P&gt;R06_MonthsAgo, MonthsAgo))&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 11:26:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issue-with-Overlapping-dimensions/m-p/2508207#M104462</guid>
      <dc:creator>QlikWilliam</dc:creator>
      <dc:date>2025-03-04T11:26:00Z</dc:date>
    </item>
  </channel>
</rss>

