<?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 Help with metric Aggr() Line Chartt in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Help-with-metric-Aggr-Line-Chartt/m-p/2155419#M93595</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I am developing a line chart that has a metric with a condition. The metric would be the following:&lt;/P&gt;
&lt;P&gt;IF(&lt;BR /&gt;SUM(AGGR( SUM(Hours) ), [Name Employee])) &amp;lt;0, 0,&lt;BR /&gt;SUM(AGGR( SUM(Hours) ), [Name Employee]))&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;What I want is for the hours to only be counted and added if they are positive, but it has to be evaluated per employee.&lt;/P&gt;
&lt;P&gt;Currently I put this metric but it does not work globally. If I choose an employee with negative hours it works, but if I select 3 employees with positive hours and 1 with negative hours, it is not able to exclude the employee with negative hours.&lt;/P&gt;
&lt;P&gt;Can you help me?&lt;/P&gt;</description>
    <pubDate>Thu, 21 Dec 2023 11:36:20 GMT</pubDate>
    <dc:creator>Patrick_Pescetto</dc:creator>
    <dc:date>2023-12-21T11:36:20Z</dc:date>
    <item>
      <title>Help with metric Aggr() Line Chartt</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-metric-Aggr-Line-Chartt/m-p/2155419#M93595</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I am developing a line chart that has a metric with a condition. The metric would be the following:&lt;/P&gt;
&lt;P&gt;IF(&lt;BR /&gt;SUM(AGGR( SUM(Hours) ), [Name Employee])) &amp;lt;0, 0,&lt;BR /&gt;SUM(AGGR( SUM(Hours) ), [Name Employee]))&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;What I want is for the hours to only be counted and added if they are positive, but it has to be evaluated per employee.&lt;/P&gt;
&lt;P&gt;Currently I put this metric but it does not work globally. If I choose an employee with negative hours it works, but if I select 3 employees with positive hours and 1 with negative hours, it is not able to exclude the employee with negative hours.&lt;/P&gt;
&lt;P&gt;Can you help me?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 11:36:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-metric-Aggr-Line-Chartt/m-p/2155419#M93595</guid>
      <dc:creator>Patrick_Pescetto</dc:creator>
      <dc:date>2023-12-21T11:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Help with metric Aggr() Line Chartt</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-metric-Aggr-Line-Chartt/m-p/2155462#M93596</link>
      <description>&lt;P&gt;Maybe this one is working:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;SUM(AGGR( RangeMax(0,SUM(Hours)) ), [Name Employee]))&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 13:23:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-metric-Aggr-Line-Chartt/m-p/2155462#M93596</guid>
      <dc:creator>vincent_ardiet_</dc:creator>
      <dc:date>2023-12-21T13:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: Help with metric Aggr() Line Chartt</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-metric-Aggr-Line-Chartt/m-p/2156411#M93655</link>
      <description>&lt;P&gt;Hello Vincent&lt;/P&gt;
&lt;P&gt;Thanks for your answer.&lt;/P&gt;
&lt;P&gt;The expression is not working. I use this:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;SUM(AGGR( RangeMax(0, Sum({&amp;lt;[Tipo Datos Hechos]={'Turnos'},[Check Ausencia]={'0'}&amp;gt;}[Total Horas]) ), [Nombre Empleado]))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;-&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SUM(AGGR( RangeMax(0, Sum({&amp;lt;[Nombre Tienda]=&amp;gt;}[Total Horas Teoricas]) ), [Nombre Empleado]))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;If you look at the screenshot, I have selected 2 employees and the result should be 3.50 hours, it should not take into account the -0.23 of the first line which is the first employee who has negative hours. That is why it shows 3.27 because it is taking all the employees results, without evaluating whether they are negative.&lt;/P&gt;
&lt;P&gt;In the table, I can put a IF condition if the hours are negative, put NULL() value, but I can't get it for the line chartt.&lt;BR /&gt;It is possible for line chartt?&lt;/P&gt;
&lt;P&gt;I hope you can help me. Thank you so much.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2023 13:08:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-metric-Aggr-Line-Chartt/m-p/2156411#M93655</guid>
      <dc:creator>Patrick_Pescetto</dc:creator>
      <dc:date>2023-12-27T13:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Help with metric Aggr() Line Chartt</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-metric-Aggr-Line-Chartt/m-p/2156629#M93689</link>
      <description>&lt;P&gt;If I'm not wrong, what could be negative is not [Total Horas] neither [&lt;SPAN&gt;Total Horas Teoricas], this is the subtraction&amp;nbsp;of both, right? You want to exclude an employee who has done less hours than he should have done in theory isn't?&lt;BR /&gt;In this case you should write the expression like this:&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SUM(AGGR( RangeMax(0, Sum({&amp;lt;[Tipo Datos Hechos]={'Turnos'},[Check Ausencia]={'0'}&amp;gt;}[Total Horas]) -&amp;nbsp;Sum({&amp;lt;[Nombre Tienda]=&amp;gt;}[Total Horas Teoricas]) ), [Nombre Empleado]))&lt;/FONT&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2023 10:09:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-metric-Aggr-Line-Chartt/m-p/2156629#M93689</guid>
      <dc:creator>vincent_ardiet_</dc:creator>
      <dc:date>2023-12-28T10:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help with metric Aggr() Line Chartt</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-metric-Aggr-Line-Chartt/m-p/2156846#M93719</link>
      <description>&lt;P&gt;It's working, thank you so much!&lt;/P&gt;
&lt;P&gt;And final question: If I want to do the same but only SUM the employees that have negative hours, how can I do it?&lt;/P&gt;
&lt;P&gt;I see you put '0' in RangeMax() but I want to only sum the employees that have negative hours, not positive. Can you help me?&lt;/P&gt;
&lt;P&gt;Thanks again.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2023 09:46:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-metric-Aggr-Line-Chartt/m-p/2156846#M93719</guid>
      <dc:creator>Patrick_Pescetto</dc:creator>
      <dc:date>2023-12-29T09:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help with metric Aggr() Line Chartt</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-metric-Aggr-Line-Chartt/m-p/2156847#M93720</link>
      <description>&lt;P&gt;If you still want to see the total of hours, you can just use RangeMin() instead of RangeMax() you will have only negative values.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2023 09:51:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-metric-Aggr-Line-Chartt/m-p/2156847#M93720</guid>
      <dc:creator>vincent_ardiet_</dc:creator>
      <dc:date>2023-12-29T09:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Help with metric Aggr() Line Chartt</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-metric-Aggr-Line-Chartt/m-p/2156852#M93721</link>
      <description>&lt;P&gt;It's working. Thank you so much again for all of your help!!&lt;/P&gt;
&lt;P&gt;Have a nice day!&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2023 10:30:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-metric-Aggr-Line-Chartt/m-p/2156852#M93721</guid>
      <dc:creator>Patrick_Pescetto</dc:creator>
      <dc:date>2023-12-29T10:30:40Z</dc:date>
    </item>
  </channel>
</rss>

