<?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 formula in Water Cooler</title>
    <link>https://community.qlik.com/t5/Water-Cooler/Need-help-with-formula/m-p/505683#M1708</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rentia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;[Date]={'&amp;lt;=$(vMaxDate)'}, Month=, Year, [Product Type] -= {'5'}, CompanyKey -= {'66'}&amp;gt;} [Total Value]) + &lt;/P&gt;&lt;P&gt;sum({&amp;lt;[Date]={'&amp;lt;=$(vMaxDate)'}, Month=, Year, CompanyKey = {'66'}&amp;gt;} [Total Value])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Oct 2013 08:39:20 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2013-10-03T08:39:20Z</dc:date>
    <item>
      <title>Need help with formula</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Need-help-with-formula/m-p/505682#M1707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Good morning all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need help with one of my formulas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the following formula to calculate excess hours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: blue; font-size: 9pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: black; font-size: 9pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: maroon; font-size: 9pt;"&gt;[Date]&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: black; font-size: 9pt;"&gt;=,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: maroon; font-size: 9pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: black; font-size: 9pt;"&gt;=,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: maroon; font-size: 9pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: black; font-size: 9pt;"&gt;=&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: blue; font-size: 9pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: maroon; font-size: 9pt;"&gt;[Date]&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: black; font-size: 9pt;"&gt;&amp;lt;=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9pt; font-family: 'Arial','sans-serif';"&gt;vMaxDate&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: black; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: blue; font-size: 9pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: maroon; font-size: 9pt;"&gt;[Product Type]&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: black; font-size: 9pt;"&gt;&amp;lt;&amp;gt;'5',&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: maroon; font-size: 9pt;"&gt;[Total Value]&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: black; font-size: 9pt;"&gt;))) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But with one of our companies (CompanyKey '66') I need to include ProductType '5' in the excess hours calculation.&lt;/P&gt;&lt;P&gt;But for all the other companies I need to exclude Product Type 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment, my formula above works perfectly for all companies, except for the company where the CompanyKey is 66. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone please advice how I can amend my formula, so that only when the CompanyKey is 66 should it include ProductType 5's.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did try to amend the formula, but then it includes 5 for all companies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;*R*&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2013 07:14:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Need-help-with-formula/m-p/505682#M1707</guid>
      <dc:creator />
      <dc:date>2013-10-03T07:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with formula</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Need-help-with-formula/m-p/505683#M1708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rentia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;[Date]={'&amp;lt;=$(vMaxDate)'}, Month=, Year, [Product Type] -= {'5'}, CompanyKey -= {'66'}&amp;gt;} [Total Value]) + &lt;/P&gt;&lt;P&gt;sum({&amp;lt;[Date]={'&amp;lt;=$(vMaxDate)'}, Month=, Year, CompanyKey = {'66'}&amp;gt;} [Total Value])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2013 08:39:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Need-help-with-formula/m-p/505683#M1708</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2013-10-03T08:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with formula</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Need-help-with-formula/m-p/505684#M1709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the above formula but it gives me zero values back for all companies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;*R*&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2013 09:01:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Need-help-with-formula/m-p/505684#M1709</guid>
      <dc:creator />
      <dc:date>2013-10-03T09:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with formula</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Need-help-with-formula/m-p/505685#M1710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rentia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would put the Companykey / ProductType construction in the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Companykey = 66, [Total value],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(ProductType = 5,0,[Total Value]))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as Hours&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hours is the resulting field you can use in your Sum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michiel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2013 09:26:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Need-help-with-formula/m-p/505685#M1710</guid>
      <dc:creator>mvanlutterveld</dc:creator>
      <dc:date>2013-10-03T09:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with formula</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Need-help-with-formula/m-p/505686#M1711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;Try This....&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: maroon;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt; = , &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: maroon;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt; = ,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: maroon;"&gt;[Company Key]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt; = {'66'} , &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: maroon;"&gt;[Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: maroon;"&gt;"&amp;lt;=$(=vMaxDate)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: maroon;"&gt;[Total Value]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;+&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: maroon;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt; = , &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: maroon;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt; = ,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: maroon;"&gt; [Company Key]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&amp;nbsp; -= {'66'} , [Product Type] -= {‘5'} ,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: maroon;"&gt;[Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: maroon;"&gt;"&amp;lt;=$(=vMaxDate)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: maroon;"&gt; [Total Value]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2013 09:31:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Need-help-with-formula/m-p/505686#M1711</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2013-10-03T09:31:39Z</dc:date>
    </item>
  </channel>
</rss>

