<?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: Help with Average of Averages in Reference line in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Help-with-Average-of-Averages-in-Reference-line/m-p/1656778#M49117</link>
    <description>&lt;P&gt;Actually,&amp;nbsp; I spoke too soon, sorry.&amp;nbsp; The QlikView Average reference line is the average of the averages.&lt;/P&gt;&lt;P&gt;The total hours over the total audits is not the same number because it doesn't take into account the team averages.&lt;/P&gt;</description>
    <pubDate>Wed, 11 Dec 2019 21:29:56 GMT</pubDate>
    <dc:creator>tschullo</dc:creator>
    <dc:date>2019-12-11T21:29:56Z</dc:date>
    <item>
      <title>Help with Average of Averages in Reference line</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-Average-of-Averages-in-Reference-line/m-p/1655702#M49025</link>
      <description>&lt;P&gt;I have a bar chart that shows the average hours spent on audits by team name in the "Reporting" phase of the project.&lt;BR /&gt;I'm only interested in hours logged in United States audits where the field RscActuals='Y'.&lt;/P&gt;&lt;P&gt;Since I am only interested in audits &amp;gt;= 2019, my Dimension is:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;=if([Audit Year]&amp;gt;=2019,[Lead Team])&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;My expression includes set analysis and looks like this:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;Sum({&amp;lt;[Audit Task]={"Reporting"}, RscActuals={'Y'}, [Audit Region]={'United States'}&amp;gt;} Hours) /Count({&amp;lt;RscActuals={'Y'}, [Audit Region]={'United States'}&amp;gt;} DISTINCT [Audit ID])&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;In QlikView I had an "Average" reference line (built in) that I am trying to replicate in QS.&lt;/P&gt;&lt;P&gt;I have searched through the posts to find some help, but nothing is working for me.&lt;/P&gt;&lt;P&gt;It should be something like:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;Avg(Total Aggr(&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;Sum({&amp;lt;[Audit Task]={"Reporting"}, RscActuals={'Y'}, [Audit Region]={'United States'}&amp;gt;} Hours)/Count({&amp;lt;RscActuals={'Y'}, [Audit Region]={'United States'}&amp;gt;} DISTINCT [Audit ID])&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;, [Lead Team]))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;But I can't get it to work.&amp;nbsp; Please help!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:53:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-Average-of-Averages-in-Reference-line/m-p/1655702#M49025</guid>
      <dc:creator>tschullo</dc:creator>
      <dc:date>2024-11-16T03:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Average of Averages in Reference line</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-Average-of-Averages-in-Reference-line/m-p/1656764#M49114</link>
      <description>&lt;P&gt;&lt;SPAN&gt;You probably want to put the time filter into the set analysis instead of the Dimension:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sum({&amp;lt;[Audit Year]={"&amp;gt;=2019"}, [Audit Task]={"Reporting"}, RscActuals={'Y'}, [Audit Region]={'United States'}&amp;gt;} Hours) /Count({&amp;lt;[Audit Year]={"&amp;gt;=2019"}, RscActuals={'Y'}, [Audit Region]={'United States'}&amp;gt;} DISTINCT [Audit ID])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Then your reference line can be:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sum({&amp;lt;[Audit Year]={"&amp;gt;=2019"}, [Audit Task]={"Reporting"}, RscActuals={'Y'}, [Audit Region]={'United States'}&amp;gt;} &lt;FONT color="#FF0000"&gt;TOTAL&lt;/FONT&gt; Hours) /Count({&amp;lt;[Audit Year]={"&amp;gt;=2019"}, RscActuals={'Y'}, [Audit Region]={'United States'}&amp;gt;} &lt;FONT color="#FF0000"&gt;TOTAL&lt;/FONT&gt; DISTINCT [Audit ID])&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 20:55:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-Average-of-Averages-in-Reference-line/m-p/1656764#M49114</guid>
      <dc:creator>Lauri</dc:creator>
      <dc:date>2019-12-11T20:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Average of Averages in Reference line</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-Average-of-Averages-in-Reference-line/m-p/1656773#M49115</link>
      <description>&lt;P&gt;Perfect! Thank you so much!&lt;/P&gt;&lt;P&gt;LetMeCount({&amp;lt;iReallyMeanIt={'True'}&amp;gt;} TOTAL Ways)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 21:10:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-Average-of-Averages-in-Reference-line/m-p/1656773#M49115</guid>
      <dc:creator>tschullo</dc:creator>
      <dc:date>2019-12-11T21:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Average of Averages in Reference line</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-Average-of-Averages-in-Reference-line/m-p/1656778#M49117</link>
      <description>&lt;P&gt;Actually,&amp;nbsp; I spoke too soon, sorry.&amp;nbsp; The QlikView Average reference line is the average of the averages.&lt;/P&gt;&lt;P&gt;The total hours over the total audits is not the same number because it doesn't take into account the team averages.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 21:29:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-Average-of-Averages-in-Reference-line/m-p/1656778#M49117</guid>
      <dc:creator>tschullo</dc:creator>
      <dc:date>2019-12-11T21:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Average of Averages in Reference line</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-Average-of-Averages-in-Reference-line/m-p/1656780#M49118</link>
      <description>&lt;P&gt;Ah, in that case I would try your Aggr, in your first post. I would expect it to work. Just add the Audit Year to its set analysis.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 21:33:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-Average-of-Averages-in-Reference-line/m-p/1656780#M49118</guid>
      <dc:creator>Lauri</dc:creator>
      <dc:date>2019-12-11T21:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Average of Averages in Reference line</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-Average-of-Averages-in-Reference-line/m-p/1656782#M49119</link>
      <description>&lt;P&gt;OK, now I have it. The premise of your answer was the correct response nonetheless.&lt;/P&gt;&lt;P&gt;Once I took the filter out of the dimension, my original approach which was failing at first now works:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;=Avg(Total Aggr(&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;Sum({&amp;lt;[Audit Year]={"&amp;gt;=2019"}, [Audit Task]={"Planning"}, RscActuals={'Y'}, [Audit Region]={'United States'}&amp;gt;} Hours)/&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;Count({&amp;lt;[Audit Year]={"&amp;gt;=2019"}, RscActuals={'Y'}, [Audit Region]={'United States'}&amp;gt;} DISTINCT [Audit ID])&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;, [Lead Team]))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 21:35:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-Average-of-Averages-in-Reference-line/m-p/1656782#M49119</guid>
      <dc:creator>tschullo</dc:creator>
      <dc:date>2019-12-11T21:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Average of Averages in Reference line</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-Average-of-Averages-in-Reference-line/m-p/1677813#M51536</link>
      <description>&lt;P&gt;I wonder if you could help me again.&amp;nbsp; We got this working a while back but now I have a new issue with the same code.&lt;/P&gt;&lt;P&gt;As you might recall I needed to know the average of averages displayed as bars. So if I had a bar1= 50, a bar2= 100, and a bar3= 150, the average would be 100 because the sum of the 3 is 300 divided by 3 gives me an average of 100.&lt;/P&gt;&lt;P&gt;The issue occurs when one of the bars has a zero value . In QlikView that bar can be suppressed (as in Qlik Sense as well) but the QV average reference line automatically takes it out of the equation. So if for example bar3= 0 and therefore suppressed, QV would sum the 2 non zero bars as 150 and divide by 2 to get an average of&amp;nbsp; 75.&amp;nbsp; In QS, it is still dividing the sum of all 3, 150 by 3 and getting 50.&lt;/P&gt;&lt;P&gt;How do I get QS reference line to behave like QV?&lt;/P&gt;&lt;P&gt;My current expression is:&lt;/P&gt;&lt;P&gt;=Avg(Total Aggr(&lt;BR /&gt;Sum({&amp;lt;[Audit Year]={"&amp;gt;=2019"}, [Audit Task]={"Reporting"}, RscActuals={'Y'}, [Audit Region]={'United States'}&amp;gt;} Hours)/&lt;BR /&gt;Count({&amp;lt;[Audit Year]={"&amp;gt;=2019"}, RscActuals={'Y'}, [Audit Region]={'United States'}&amp;gt;} DISTINCT [Audit ID])&lt;BR /&gt;, [Lead Team]))&lt;/P&gt;&lt;P&gt;In English, this translates to give me the average of average Hours spent on audits by Lead Team where the year &amp;gt;=2019, the audit task is "Reporting" and the hours are flagged as RscActuals=Y in the United States region.&lt;/P&gt;&lt;P&gt;The added caveat that is missing is, don't count any Lead Teams where no time was spent on audits.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 21:50:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-Average-of-Averages-in-Reference-line/m-p/1677813#M51536</guid>
      <dc:creator>tschullo</dc:creator>
      <dc:date>2020-02-20T21:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Average of Averages in Reference line</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-Average-of-Averages-in-Reference-line/m-p/1677856#M51541</link>
      <description>&lt;P&gt;Adding set analysis to include only Hours greater than zero (to both the measure and reference line) may address both issues:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum({&amp;lt;[Audit Year]={"&amp;gt;=2019"}, [Audit Task]={"Reporting"}, RscActuals={'Y'}, [Audit Region]={'United States'}, Hours={"&amp;gt;0"}&amp;gt;} Hours)/
Count({&amp;lt;[Audit Year]={"&amp;gt;=2019"}, RscActuals={'Y'}, [Audit Region]={'United States'}, Hours={"&amp;gt;0"}&amp;gt;} DISTINCT [Audit ID])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 02:22:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-Average-of-Averages-in-Reference-line/m-p/1677856#M51541</guid>
      <dc:creator>Lauri</dc:creator>
      <dc:date>2020-02-21T02:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Average of Averages in Reference line</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-Average-of-Averages-in-Reference-line/m-p/1678046#M51560</link>
      <description>&lt;P&gt;Hmmm... nope, that didn't work either&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 13:46:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-Average-of-Averages-in-Reference-line/m-p/1678046#M51560</guid>
      <dc:creator>tschullo</dc:creator>
      <dc:date>2020-02-21T13:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Average of Averages in Reference line</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-Average-of-Averages-in-Reference-line/m-p/1678181#M51570</link>
      <description>&lt;P&gt;What does your data model look like?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 21:54:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-Average-of-Averages-in-Reference-line/m-p/1678181#M51570</guid>
      <dc:creator>Lauri</dc:creator>
      <dc:date>2020-02-21T21:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Average of Averages in Reference line</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-Average-of-Averages-in-Reference-line/m-p/1678187#M51573</link>
      <description>&lt;P&gt;Team&amp;nbsp; &amp;nbsp;Audit&amp;nbsp; &amp;nbsp; Hrs&amp;nbsp; &amp;nbsp; Rsc Ctr&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Rsc ID&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A123&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; France&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A103&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;15&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Canada&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/P&gt;&lt;P&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A123&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;15&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;France&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&lt;/P&gt;&lt;P&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A123&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;25&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Canada&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4&lt;/P&gt;&lt;P&gt;C&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A111&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;30&amp;nbsp; &amp;nbsp; &amp;nbsp; Canada&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;/P&gt;&lt;P&gt;C&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A123&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;50&amp;nbsp; &amp;nbsp; &amp;nbsp; Canada&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I have no ctry selection bars are A=10, B=20, C=40. Average should be 35. Current expression works.&lt;/P&gt;&lt;P&gt;But if I select France, bars should be A=5, B=15 and average would be 10, not 20/3.&lt;/P&gt;&lt;P&gt;I'm not at work today, will give you exact model Monday.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 22:32:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-Average-of-Averages-in-Reference-line/m-p/1678187#M51573</guid>
      <dc:creator>tschullo</dc:creator>
      <dc:date>2020-02-21T22:32:01Z</dc:date>
    </item>
  </channel>
</rss>

