<?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 More than one aggregate calculation in one expression in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/More-than-one-aggregate-calculation-in-one-expression/m-p/2077302#M88364</link>
    <description>&lt;P&gt;My data looks like below snip. Granularity is at Company, Monthstart and City, while showroom is needed for other pieces of the app, Sales is attributed to the showrooms within the city .&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Braveen_0-1685356769766.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/108531iBAC2C1811AF53AC8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Braveen_0-1685356769766.png" alt="Braveen_0-1685356769766.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Desired output looks like below;&lt;/P&gt;
&lt;P&gt;Table view which shows all the companies, sales and market share:&lt;/P&gt;
&lt;P&gt;Without any filter view&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Braveen_1-1685357051366.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/108532iF892FF0B82E44FEE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Braveen_1-1685357051366.png" alt="Braveen_1-1685357051366.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;When showroom filter is applied;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Braveen_2-1685357102244.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/108533i5A987776B49617B0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Braveen_2-1685357102244.png" alt="Braveen_2-1685357102244.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The expression should take care of 3 scenario:&lt;/P&gt;
&lt;P&gt;1. Without any filter, sales must be calculated for unique Company, City, Monthstart combination&lt;/P&gt;
&lt;P&gt;2. When showroom filter is applied across different cities like Delhi-1 and Mumbai-1, again&amp;nbsp;sales must be calculated for unique Company, Monthstart combination and respective showrooms&lt;/P&gt;
&lt;P&gt;3. When two or more showrooms in same city is selected like Delhi-1 and Delhi-2, sales must be calculated for&amp;nbsp;unique Company, City, Monthstart combination&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried&lt;/P&gt;
&lt;P&gt;1. Not sure how to achieve this&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp;sum( {&amp;lt;Monthstart= {'2023-05-01'}&amp;gt;} Registration) /*Current month*/ , Need help for overall sales&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp;sum( {&amp;lt;Monthstart= {'2023-05-01'}&amp;gt;} Registration)&amp;nbsp;&amp;nbsp;/ count(distinct Showroom)&lt;/P&gt;
&lt;P&gt;Help would be appreciated.&lt;/P&gt;
&lt;P&gt;Here is the inline script :);&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;LOAD * INLINE [ Company, City, Showroom, Monthstart, Sales A, Delhi, Delhi-1, 01/Apr/23, 326 A, Delhi, Delhi-2, 01/May/23, 326 A, Mumbai, Mumbai-1, 01/Apr/23, 272 A, Mumbai, Mumbai-2, 01/May/23, 272 A, Goa, Goa-1, 01/May/23, 61 B, Delhi, Delhi-4, 01/Feb/23, 608 B, Delhi, Delhi-2, 01/Mar/23, 608 B, Delhi, Delhi-3, 01/Apr/23, 608 B, Delhi, Delhi-1, 01/May/23, 608 C, Kochi, Kochi-1, 01/Apr/23, 815 C, Bengaluru, Bengaluru-1, 01/May/23, 673]&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 29 May 2023 10:56:42 GMT</pubDate>
    <dc:creator>Braveen</dc:creator>
    <dc:date>2023-05-29T10:56:42Z</dc:date>
    <item>
      <title>More than one aggregate calculation in one expression</title>
      <link>https://community.qlik.com/t5/App-Development/More-than-one-aggregate-calculation-in-one-expression/m-p/2077302#M88364</link>
      <description>&lt;P&gt;My data looks like below snip. Granularity is at Company, Monthstart and City, while showroom is needed for other pieces of the app, Sales is attributed to the showrooms within the city .&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Braveen_0-1685356769766.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/108531iBAC2C1811AF53AC8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Braveen_0-1685356769766.png" alt="Braveen_0-1685356769766.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Desired output looks like below;&lt;/P&gt;
&lt;P&gt;Table view which shows all the companies, sales and market share:&lt;/P&gt;
&lt;P&gt;Without any filter view&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Braveen_1-1685357051366.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/108532iF892FF0B82E44FEE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Braveen_1-1685357051366.png" alt="Braveen_1-1685357051366.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;When showroom filter is applied;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Braveen_2-1685357102244.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/108533i5A987776B49617B0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Braveen_2-1685357102244.png" alt="Braveen_2-1685357102244.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The expression should take care of 3 scenario:&lt;/P&gt;
&lt;P&gt;1. Without any filter, sales must be calculated for unique Company, City, Monthstart combination&lt;/P&gt;
&lt;P&gt;2. When showroom filter is applied across different cities like Delhi-1 and Mumbai-1, again&amp;nbsp;sales must be calculated for unique Company, Monthstart combination and respective showrooms&lt;/P&gt;
&lt;P&gt;3. When two or more showrooms in same city is selected like Delhi-1 and Delhi-2, sales must be calculated for&amp;nbsp;unique Company, City, Monthstart combination&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried&lt;/P&gt;
&lt;P&gt;1. Not sure how to achieve this&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp;sum( {&amp;lt;Monthstart= {'2023-05-01'}&amp;gt;} Registration) /*Current month*/ , Need help for overall sales&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp;sum( {&amp;lt;Monthstart= {'2023-05-01'}&amp;gt;} Registration)&amp;nbsp;&amp;nbsp;/ count(distinct Showroom)&lt;/P&gt;
&lt;P&gt;Help would be appreciated.&lt;/P&gt;
&lt;P&gt;Here is the inline script :);&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;LOAD * INLINE [ Company, City, Showroom, Monthstart, Sales A, Delhi, Delhi-1, 01/Apr/23, 326 A, Delhi, Delhi-2, 01/May/23, 326 A, Mumbai, Mumbai-1, 01/Apr/23, 272 A, Mumbai, Mumbai-2, 01/May/23, 272 A, Goa, Goa-1, 01/May/23, 61 B, Delhi, Delhi-4, 01/Feb/23, 608 B, Delhi, Delhi-2, 01/Mar/23, 608 B, Delhi, Delhi-3, 01/Apr/23, 608 B, Delhi, Delhi-1, 01/May/23, 608 C, Kochi, Kochi-1, 01/Apr/23, 815 C, Bengaluru, Bengaluru-1, 01/May/23, 673]&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 May 2023 10:56:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/More-than-one-aggregate-calculation-in-one-expression/m-p/2077302#M88364</guid>
      <dc:creator>Braveen</dc:creator>
      <dc:date>2023-05-29T10:56:42Z</dc:date>
    </item>
  </channel>
</rss>

