<?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: Different calculations within a dimension in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Different-calculations-within-a-dimension/m-p/1770544#M59620</link>
    <description>&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If(GetSelectedCount(group)&amp;gt;0, Sum(Saels), Sum({&amp;lt;Date={"&amp;gt;$(=num(Max(Aggr(Date#(start,'YYYY-MM'),group))))&amp;lt;=$(=num(Max(Aggr(Date#(stop,'YYYY-MM'),group))))"}&amp;gt;} Sales))&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Dec 2020 21:14:02 GMT</pubDate>
    <dc:creator>Anil_Babu_Samineni</dc:creator>
    <dc:date>2020-12-25T21:14:02Z</dc:date>
    <item>
      <title>Different calculations within a dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Different-calculations-within-a-dimension/m-p/1769456#M59509</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I'm trying to make a measure with set analysis that makes a calculation based on input of the dimension. It works when I select one of the items in the dimension but it stops when there is no selection. When there is no selection I would like the expression to calculate it for all items in the dimension&lt;/P&gt;&lt;P&gt;group | start | end&lt;/P&gt;&lt;P&gt;group A |&amp;nbsp; Jul-2019 | Jul-2020&lt;/P&gt;&lt;P&gt;group B | Sep-2019 | Mar-2020&lt;/P&gt;&lt;P&gt;I want to sum the sales with the start and end data of the groups. First I created a big table and made a pick&amp;amp;match formula to loop through the groups. This works but not if the groups dimension is not in there. So I could not use it in a KPI.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created the following, which works, but only if I select a group. When I don't have a selection I get zero&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Date={"&amp;gt;$(=num(Max(Aggr(Date#(start,'YYYY-MM'),group))))&amp;lt;=$(=num(Max(Aggr(Date#(stop,'YYYY-MM'),group))))"}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also tried with Aggr before the Sum function but the results where the same. If Group A has 2,000$ in their period and Group B has 3,000$ in their period I would like to have a KPI giving me 5,000$&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 12:51:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Different-calculations-within-a-dimension/m-p/1769456#M59509</guid>
      <dc:creator>paultt2</dc:creator>
      <dc:date>2020-12-18T12:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Different calculations within a dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Different-calculations-within-a-dimension/m-p/1770544#M59620</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If(GetSelectedCount(group)&amp;gt;0, Sum(Saels), Sum({&amp;lt;Date={"&amp;gt;$(=num(Max(Aggr(Date#(start,'YYYY-MM'),group))))&amp;lt;=$(=num(Max(Aggr(Date#(stop,'YYYY-MM'),group))))"}&amp;gt;} Sales))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Dec 2020 21:14:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Different-calculations-within-a-dimension/m-p/1770544#M59620</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2020-12-25T21:14:02Z</dc:date>
    </item>
  </channel>
</rss>

