<?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: Expression on aggregated data in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Expression-on-aggregated-data/m-p/1102758#M18678</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Avg(Aggr(&lt;/STRONG&gt;&lt;STRONG&gt;Sum({&amp;lt;[Buying Channel] = {'eCatalog', 'Mat. Master Contract'}&amp;gt;}&lt;/STRONG&gt;&lt;STRONG style="font-size: 10pt; line-height: 1.5em;"&gt;Aggr(&lt;/STRONG&gt;&lt;STRONG style="font-size: 10pt; line-height: 1.5em;"&gt;Round(Count([Buying Channel])/Count(TOTAL &amp;lt;[Year/Month]&amp;gt;[Buying Channel]), 0.01), &lt;/STRONG&gt;&lt;STRONG&gt;[Year/Month], [Buying Channel])), &lt;/STRONG&gt;&lt;STRONG&gt;[Year/Month]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this has gotten very complicated because of the need to round the numbers to reach what you are looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If rounding is not a big requirement, then below will work as well:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Avg(Aggr(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count({&amp;lt;[Buying Channel] = {'eCatalog', 'Mat. Master Contract'}&amp;gt;}[Buying Channel])/Count([Buying Channel]), [Year/Month]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/125325_Capture.PNG" style="height: 194px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 21 May 2016 18:23:24 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-05-21T18:23:24Z</dc:date>
    <item>
      <title>Expression on aggregated data</title>
      <link>https://community.qlik.com/t5/App-Development/Expression-on-aggregated-data/m-p/1102757#M18677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Qlik community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recently started using Qlik Sense desktop as Excel could no longer handle the amount of data I was feeding it. While I really like the performance I’m struggling a bit with the expressions. Therefore I registered to this community to get some help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please have a look at the visual overview of the requirement I put in attachment. You’ll see I added a stacked bar chart where I already used an expression to display the percentage of each Buying Channel per Year/Month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then added a second chart (= KPI) where I would like to have the average percentage of a sum of Buying Channels displayed. E.g. when Year/Month 2015/01, 2015/02, 2015/03 is selected it displays 25,33% and when only 2015/01 and 2015/02 is selected it displays 25,00%.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried using the following expression: AVG(Count({&amp;lt;[Buying Channel]={Single PO}&amp;gt;}[Buying Channel])+Count({&amp;lt;[Buying Channel]={Low Value}&amp;gt;}[Buying Channel]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately this expression is not valid. Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;P.S. I also attached the qvf-app.&lt;/EM&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 8pt;"&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 8pt;"&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Nov 2024 10:38:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Expression-on-aggregated-data/m-p/1102757#M18677</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T10:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: Expression on aggregated data</title>
      <link>https://community.qlik.com/t5/App-Development/Expression-on-aggregated-data/m-p/1102758#M18678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Avg(Aggr(&lt;/STRONG&gt;&lt;STRONG&gt;Sum({&amp;lt;[Buying Channel] = {'eCatalog', 'Mat. Master Contract'}&amp;gt;}&lt;/STRONG&gt;&lt;STRONG style="font-size: 10pt; line-height: 1.5em;"&gt;Aggr(&lt;/STRONG&gt;&lt;STRONG style="font-size: 10pt; line-height: 1.5em;"&gt;Round(Count([Buying Channel])/Count(TOTAL &amp;lt;[Year/Month]&amp;gt;[Buying Channel]), 0.01), &lt;/STRONG&gt;&lt;STRONG&gt;[Year/Month], [Buying Channel])), &lt;/STRONG&gt;&lt;STRONG&gt;[Year/Month]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this has gotten very complicated because of the need to round the numbers to reach what you are looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If rounding is not a big requirement, then below will work as well:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Avg(Aggr(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count({&amp;lt;[Buying Channel] = {'eCatalog', 'Mat. Master Contract'}&amp;gt;}[Buying Channel])/Count([Buying Channel]), [Year/Month]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/125325_Capture.PNG" style="height: 194px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 May 2016 18:23:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Expression-on-aggregated-data/m-p/1102758#M18678</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-21T18:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: Expression on aggregated data</title>
      <link>https://community.qlik.com/t5/App-Development/Expression-on-aggregated-data/m-p/1102759#M18679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exactly what I was looking for. You even went "overboard" with the rounding, but it is much appreciated. Thx.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2016 07:26:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Expression-on-aggregated-data/m-p/1102759#M18679</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-23T07:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: Expression on aggregated data</title>
      <link>https://community.qlik.com/t5/App-Development/Expression-on-aggregated-data/m-p/1102760#M18680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well the issue was the without rounding I was not getting the same number as yours and I was not sure if those are the exact numbers you are looking for or not. But I am glad we got it resolved &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2016 10:29:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Expression-on-aggregated-data/m-p/1102760#M18680</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-23T10:29:45Z</dc:date>
    </item>
  </channel>
</rss>

