<?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: Need Help with function If in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-Help-with-function-If/m-p/1088922#M940737</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot it's work perfectly &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Jan 2016 08:06:59 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-01-28T08:06:59Z</dc:date>
    <item>
      <title>Need Help with function If</title>
      <link>https://community.qlik.com/t5/QlikView/Need-Help-with-function-If/m-p/1088918#M940733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem to calculate a function.&lt;/P&gt;&lt;P&gt;I have two document types, an invoice and a credit note.&lt;/P&gt;&lt;P&gt;When I have invoice the amount is positive, but when I have a credit note I will wish him to return a negative amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this formula but it does me no return value:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; If( (Type_Facture) = 'Avoir', sum({ &amp;lt;Date_Facture={'&amp;gt;=$(vDateDebCalendrier)&amp;lt;=$(vDateFinCalendrier)'}&amp;gt;} -MontantHT_Ligne) or&amp;nbsp; If( (Type_Facture) = 'Facture', sum({ &amp;lt;Date_Facture={'&amp;gt;=$(vDateDebCalendrier)&amp;lt;=$(vDateFinCalendrier)'}&amp;gt;} MontantHT_Ligne)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone can help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jan 2016 07:08:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-Help-with-function-If/m-p/1088918#M940733</guid>
      <dc:creator />
      <dc:date>2016-01-28T07:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with function If</title>
      <link>https://community.qlik.com/t5/QlikView/Need-Help-with-function-If/m-p/1088919#M940734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looks like there is an issue with your syntax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try this and see if it works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If( (Type_Facture = 'Avoir', sum({ &amp;lt;Date_Facture={'&amp;gt;=$(vDateDebCalendrier)&amp;lt;=$(vDateFinCalendrier)'}&amp;gt;} -MontantHT_Ligne), If( Type_Facture = 'Facture', sum({ &amp;lt;Date_Facture={'&amp;gt;=$(vDateDebCalendrier)&amp;lt;=$(vDateFinCalendrier)'}&amp;gt;} MontantHT_Ligne)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jan 2016 07:51:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-Help-with-function-If/m-p/1088919#M940734</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-28T07:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with function If</title>
      <link>https://community.qlik.com/t5/QlikView/Need-Help-with-function-If/m-p/1088920#M940735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps alt-edited"&gt;You need&lt;/SPAN&gt; &lt;SPAN class="hps alt-edited"&gt;change you&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;expression&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;with correct&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;syntax.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If( Type_Facture = 'Avoir',&lt;/P&gt;&lt;P&gt;sum({ &amp;lt;Date_Facture={'&amp;gt;=$(vDateDebCalendrier)&amp;lt;=$(vDateFinCalendrier)'}&amp;gt;} -MontantHT_Ligne),&lt;/P&gt;&lt;P&gt;&amp;nbsp; If( Type_Facture = 'Facture',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; sum({ &amp;lt;Date_Facture={'&amp;gt;=$(vDateDebCalendrier)&amp;lt;=$(vDateFinCalendrier)'}&amp;gt;} MontantHT_Ligne)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jan 2016 07:53:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-Help-with-function-If/m-p/1088920#M940735</guid>
      <dc:creator>asgardd2</dc:creator>
      <dc:date>2016-01-28T07:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with function If</title>
      <link>https://community.qlik.com/t5/QlikView/Need-Help-with-function-If/m-p/1088921#M940736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;sum({&amp;lt;Date_Facture={'&amp;gt;=$(vDateDebCalendrier)&amp;lt;=$(vDateFinCalendrier)'}, Type_Facture = {'Facture'}&amp;gt;} MontantHT_Ligne) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;- sum({&amp;lt;Date_Facture={'&amp;gt;=$(vDateDebCalendrier)&amp;lt;=$(vDateFinCalendrier)'}, Type_Facture = {'Avoir'}&amp;gt;} MontantHT_Ligne)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because Invoice types can change per row, the IF() should be placed inside your sum() aggregation function. And because an IF() that is executed once per row is incredibly bad for performance when processing large amounts of invoices, we use set analysis again to separate Invoices from Credit Notes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bonne chance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jan 2016 08:03:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-Help-with-function-If/m-p/1088921#M940736</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2016-01-28T08:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with function If</title>
      <link>https://community.qlik.com/t5/QlikView/Need-Help-with-function-If/m-p/1088922#M940737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot it's work perfectly &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jan 2016 08:06:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-Help-with-function-If/m-p/1088922#M940737</guid>
      <dc:creator />
      <dc:date>2016-01-28T08:06:59Z</dc:date>
    </item>
  </channel>
</rss>

