<?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: Set analysis with networkdays problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-networkdays-problem/m-p/1674420#M727887</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was making some tests on a test app with a slightly modified expression (without Networkdays), so the one I put above I wrote it directly on the webpage, and there is only an extra bracket (the red one):&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=avg({&amp;lt;Equipes={'Equipe CR'},Année={$(=Max(Année))},Mois={"&amp;lt;=$(=max(Mois))"}&amp;gt;}aggr(sum({&amp;lt;[Date Création]={"=only({1}[Date Emission])&amp;gt;only({1}[Date Début Effet])"},Mois={"&amp;lt;=$(=max(Mois))"}&amp;gt;} NetWorkDays([Date Début Effet],[Date Emission]))&lt;FONT size="5" color="#FF0000"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;,[N° Quittance]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The real problem is when I tried this one on the real app, the numbers are completely different..&lt;/P&gt;&lt;P&gt;Is there something missing here too ?&lt;/P&gt;</description>
    <pubDate>Tue, 11 Feb 2020 14:15:01 GMT</pubDate>
    <dc:creator>YoussefBelloum</dc:creator>
    <dc:date>2020-02-11T14:15:01Z</dc:date>
    <item>
      <title>Set analysis with networkdays problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-networkdays-problem/m-p/1674322#M727883</link>
      <description>&lt;P&gt;Hi everyone !&lt;/P&gt;&lt;P&gt;I'm struggling on make my expression works...&lt;/P&gt;&lt;P&gt;Below is my data structure:&lt;/P&gt;&lt;TABLE width="455"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="99"&gt;Date Annulation&lt;/TD&gt;&lt;TD width="86"&gt;Date Création&lt;/TD&gt;&lt;TD width="103"&gt;Date Début Effet&lt;/TD&gt;&lt;TD width="87"&gt;Date Emission&lt;/TD&gt;&lt;TD width="80"&gt;N° Quittance&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;19/11/2015&lt;/TD&gt;&lt;TD&gt;01/01/2016&lt;/TD&gt;&lt;TD&gt;01/01/2016&lt;/TD&gt;&lt;TD&gt;2160100003&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;01/01/2015&lt;/TD&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;2160100192&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;01/01/2015&lt;/TD&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;2160100194&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;01/01/2015&lt;/TD&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;2160100209&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;19/01/2015&lt;/TD&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;2160100189&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;03/07/2015&lt;/TD&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;2160100210&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;05/01/2016&lt;/TD&gt;&lt;TD&gt;30/11/2015&lt;/TD&gt;&lt;TD&gt;01/01/2016&lt;/TD&gt;&lt;TD&gt;01/01/2016&lt;/TD&gt;&lt;TD&gt;2160100083&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;06/01/2016&lt;/TD&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;01/01/2016&lt;/TD&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;2160100300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;06/01/2016&lt;/TD&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;01/01/2016&lt;/TD&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;2160101076&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11/01/2016&lt;/TD&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;01/01/2016&lt;/TD&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;2160100263&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11/01/2016&lt;/TD&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;01/01/2016&lt;/TD&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;2160100266&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11/01/2016&lt;/TD&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;01/01/2016&lt;/TD&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;2160100665&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11/01/2016&lt;/TD&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;01/01/2016&lt;/TD&gt;&lt;TD&gt;04/01/2016&lt;/TD&gt;&lt;TD&gt;2160100666&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm calculating the avg of deadlines for issuing receipts with some conditions, with the (working) expression below:&lt;/P&gt;&lt;P&gt;=avg({&amp;lt;Equipes={'Equipe CR'},Année={$(=Max(Année))},Mois={"&amp;lt;=$(=max(Mois))"}&amp;gt;}aggr( if([Date Emission]&amp;gt;[Date Début Effet], NetWorkDays([Date Début Effet],[Date Emission])),[N° Quittance]))&lt;/P&gt;&lt;P&gt;I'm using a line chart and here is the result:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IMAGE1.png" style="width: 667px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/28253i3FC14E4043B011DF/image-size/large?v=v2&amp;amp;px=999" role="button" title="IMAGE1.png" alt="IMAGE1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;everything is working fine until I try to filter on month field (Month field is a calendar field, my table above is linked with the calendar field with the date field "Date création"), when I select a value on month, example "July", I need the lines to show from January TO July.. but the lines are showing this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IMAGE2.png" style="width: 649px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/28254i97C4EF685681C010/image-size/large?v=v2&amp;amp;px=999" role="button" title="IMAGE2.png" alt="IMAGE2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;PS: THE " Année={$(=Max(Année))},Mois={"&amp;lt;=$(=max(Mois))"} "portion of my set analysis works perfectly fine on all the other charts of my app, except the one described above...&lt;/P&gt;&lt;P&gt;One last note: it seems that the set analysis partially works, because the chart is filtered from January to July when I select July on the field Month, but something is missing to show all the values of the line...&lt;/P&gt;&lt;P&gt;Thank for your help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Youssef B.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 19:08:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-networkdays-problem/m-p/1674322#M727883</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2024-11-16T19:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with networkdays problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-networkdays-problem/m-p/1674389#M727884</link>
      <description>&lt;P&gt;You might need to ignore selection in your fields inside the Aggr() function expression&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=Avg({&amp;lt;Equipes = {'Equipe CR'}, Année = {$(=Max(Année))}, Mois = {"&amp;lt;=$(=max(Mois))"}&amp;gt;}Aggr(
    
    If(Only({1} [Date Emission]) &amp;gt; Only({1} [Date Début Effet]), Only({1} NetWorkDays([Date Début Effet], [Date Emission])))

, [N° Quittance]))&lt;/LI-CODE&gt;&lt;P&gt;I have ignored all selections using {1}, but you can ignore selection in certain fields based on your requirement.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 13:10:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-networkdays-problem/m-p/1674389#M727884</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-02-11T13:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with networkdays problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-networkdays-problem/m-p/1674396#M727885</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was trying to post the solution I found too, I replaced the if with a set analysis and used {1}:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=avg({&amp;lt;Equipes={'Equipe CR'},Année={$(=Max(Année))},Mois={"&amp;lt;=$(=max(Mois))"}&amp;gt;}aggr(sum({&amp;lt;[Date Création]={"=only({1}[Date Emission])&amp;gt;only({1}[Date Début Effet])"},Mois={"&amp;lt;=$(=max(Mois))"}&amp;gt;} NetWorkDays([Date Début Effet],[Date Emission]))),[N° Quittance]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 13:25:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-networkdays-problem/m-p/1674396#M727885</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2020-02-11T13:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with networkdays problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-networkdays-problem/m-p/1674407#M727886</link>
      <description>&lt;P&gt;Does this expression really works? Seeing few errors in the syntax&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 13:53:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-networkdays-problem/m-p/1674407#M727886</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-02-11T13:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with networkdays problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-networkdays-problem/m-p/1674420#M727887</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was making some tests on a test app with a slightly modified expression (without Networkdays), so the one I put above I wrote it directly on the webpage, and there is only an extra bracket (the red one):&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=avg({&amp;lt;Equipes={'Equipe CR'},Année={$(=Max(Année))},Mois={"&amp;lt;=$(=max(Mois))"}&amp;gt;}aggr(sum({&amp;lt;[Date Création]={"=only({1}[Date Emission])&amp;gt;only({1}[Date Début Effet])"},Mois={"&amp;lt;=$(=max(Mois))"}&amp;gt;} NetWorkDays([Date Début Effet],[Date Emission]))&lt;FONT size="5" color="#FF0000"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;,[N° Quittance]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The real problem is when I tried this one on the real app, the numbers are completely different..&lt;/P&gt;&lt;P&gt;Is there something missing here too ?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 14:15:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-networkdays-problem/m-p/1674420#M727887</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2020-02-11T14:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with networkdays problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-networkdays-problem/m-p/1674424#M727888</link>
      <description>&lt;P&gt;I am not sure what exactly is the expectation... my bad with not reading your expression... what I thought was an error... was not really an error.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 14:24:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-networkdays-problem/m-p/1674424#M727888</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-02-11T14:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with networkdays problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-networkdays-problem/m-p/1674444#M727889</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was expecting to make the expression work with a set analysis instead the IF used on the first expression&lt;/P&gt;&lt;P&gt;That means, Replacing the Red part of your expression:&lt;/P&gt;&lt;P&gt;=avg({&amp;lt;Equipes={'Equipe CR'},Année={$(=Max(Année))},Mois={"&amp;lt;=$(=max(Mois))"}&amp;gt;}aggr( &lt;FONT color="#FF0000"&gt;if(only({1}[Date Emission])&amp;gt;only({1}[Date Début Effet]), Only({1}NetWorkDays(&lt;/FONT&gt;[Date Début Effet],[Date Emission]))),[N° Quittance]))&lt;/P&gt;&lt;P&gt;with the green part of this expression:&lt;/P&gt;&lt;P&gt;=avg({&amp;lt;Equipes={'Equipe CR'},Année={$(=Max(Année))},Mois={"&amp;lt;=$(=max(Mois))"}&amp;gt;}aggr(&lt;FONT color="#339966"&gt;sum({&amp;lt;Date={"=only({1}[Date Emission])&amp;gt;only({1}[Date Début Effet])"}&amp;gt;} NetWorkDays(&lt;/FONT&gt;[Date Début Effet],[Date Emission])),[N° Quittance]))&lt;/P&gt;&lt;P&gt;I thought it is working, but it is not...&lt;/P&gt;&lt;P&gt;Is there something missing on the expression with the green part ?&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 15:02:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-networkdays-problem/m-p/1674444#M727889</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2020-02-11T15:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with networkdays problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-networkdays-problem/m-p/1674454#M727890</link>
      <description>&lt;P&gt;May be try this... but you are not getting rid of the if statement... you are just moving it within your set analysis...&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=Avg({&amp;lt;Equipes = {'Equipe CR'}, Année = {$(=Max(Année))}, Mois = {"&amp;lt;=$(=max(Mois))"}, [N° Quittance] = {"=Only({1} [Date Emission]) &amp;gt; Only({1} [Date Début Effet])"}&amp;gt;} NetWorkDays([Date Début Effet], [Date Emission]))&lt;/LI-CODE&gt;&lt;P&gt;To get rid of the if statement... I would say that try to create a flag by running this in the script&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;If([Date Emission]) &amp;gt; [Date Début Effet], 1, 0) as TrueFalseFlag&lt;/LI-CODE&gt;&lt;P&gt;and then this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=Avg({&amp;lt;Equipes = {'Equipe CR'}, Année = {$(=Max(Année))}, Mois = {"&amp;lt;=$(=max(Mois))"}, [TrueFalseFlag] = {'1'}&amp;gt;} NetWorkDays([Date Début Effet], [Date Emission]))&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 11 Feb 2020 15:17:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-networkdays-problem/m-p/1674454#M727890</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-02-11T15:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with networkdays problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-networkdays-problem/m-p/1674467#M727891</link>
      <description>&lt;P&gt;You answered all my questions. Thank you for your time&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 15:38:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-networkdays-problem/m-p/1674467#M727891</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2020-02-11T15:38:50Z</dc:date>
    </item>
  </channel>
</rss>

