<?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: Reg : How to make an expression in Water Cooler</title>
    <link>https://community.qlik.com/t5/Water-Cooler/Reg-How-to-make-an-expression/m-p/335341#M589</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jorge,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am explaining with example, Please go through the attached jpeg file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the top &lt;STRONG&gt;Net Collectable as per milestone&lt;/STRONG&gt; - 1887.8, &lt;STRONG&gt;Reason Code Amount&lt;/STRONG&gt; - 1509.064 and &lt;STRONG&gt;Net Collecable after reason&lt;/STRONG&gt; - 447.7841&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Net Collectable as per milestone = Reason Code Amount + Net Collecable after reason&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reason Code Amount = Land + LD Claim Amount + NOC + Projects + Early RR + Others + Invoice + PE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Net Collecable after reason = RM + Fin Closure&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All these amount are coming on the behalf of some reason and at a time there is 2 reason amount will be availale&lt;STRONG&gt; (e.g - either LAND + Project or NOC + PE etc...) &lt;/STRONG&gt;which is equal to the&lt;STRONG&gt; NET Collectable as per milestone.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose the sum of these to reason amount is greater than &lt;STRONG&gt;NET Collectable as per milestone, &lt;/STRONG&gt;Than we have to find which reason have&lt;STRONG&gt; max value &lt;/STRONG&gt;and then&lt;STRONG&gt; assign to them whatever NET Collectable as per milestone &lt;/STRONG&gt;amount is available&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try to resolve. Please revert to me for any clarification.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thanks in advance.&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 May 2012 04:49:16 GMT</pubDate>
    <dc:creator>sona_sa</dc:creator>
    <dc:date>2012-05-15T04:49:16Z</dc:date>
    <item>
      <title>Reg : How to make an expression</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Reg-How-to-make-an-expression/m-p/335339#M587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need help for making an expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 12 types of Reason_Amount: These are following -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Reason_RM&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Reason_Project&lt;/P&gt;&lt;P&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Reason_PE&lt;/P&gt;&lt;P&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Reason_Land&lt;/P&gt;&lt;P&gt;5.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Reason_Fin_Closure&lt;/P&gt;&lt;P&gt;6.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Reason_Row&lt;/P&gt;&lt;P&gt;7.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Reason_NOC&lt;/P&gt;&lt;P&gt;8.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Reason_ER&lt;/P&gt;&lt;P&gt;9.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Reason_DCLR&lt;/P&gt;&lt;P&gt;10.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Reason_Others&lt;/P&gt;&lt;P&gt;11.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Reason_LDC&lt;/P&gt;&lt;P&gt;12.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Reason_GC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also 2 more Amounts:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Net_Collectable_Amount and Total_Reason_Amount&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I have to make an expression on these 14 fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Condition is like this:&lt;/P&gt;&lt;P&gt;1. If (Net_Collectable_Amount &amp;gt; Total_Reason_Amount) and any one Reason_Amount &amp;gt; 0, then replace that Net_Collectable_Amount to that &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Reason_Amount which have more then 0 (zero) amount.&lt;/P&gt;&lt;P&gt; 2. Else If Check (Net_Collectable_Amount &amp;gt; Total_Reason_Amount) and Reason_RM = ' 0 ' and Reason_Fin_Closure = ‘ 0 ', then Add the difference of &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Net_Collectable_Amount - Total_Reason_Amount ) in the behalf of max ( Another 10 Reason_Amount)&lt;/P&gt;&lt;P&gt; 3. Else Check (Net_Collectable_Amount &amp;gt; Total_Reason_Amount ) and Reason_RM &amp;lt;&amp;gt; ' 0 ' and Reason_Fin_Closure &amp;lt;&amp;gt; ' 0 '&amp;nbsp; then Add the difference of ( &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Net_Collectable_Amount - Total_Reason_Amount ) in the behalf of max( Another these two Reason_RM or Reason_Fin_Closure).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;On these three condition I have to make a nested if expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For More Reference please find the attached image:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Total Collectable amount is greater than Total Reason Amount and Only the Reason_Project is greater then zero and the entire column is zero, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; then assign the Total Collectable amount to that particular Reason_Project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Similarly Suppose Total Collectable amount is greater than Total Reason Amount and Reason_RM = ' 0 ' and Reason_Fin_Closure = '&amp;nbsp; 0 ', Then difference &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; of&amp;nbsp; Total Collectable amount and Total Reason Amount will assigned to max of another 10 Reason_Amount which have the max value except Reason_RM &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; and Reason_Fin_Closure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Similarly Suppose Total Collectable amount is greater than Total Reason Amount and Reason_RM &amp;lt;&amp;gt; ' 0 ' and Reason_Fin_Closure&amp;nbsp; &amp;lt;&amp;gt; '&amp;nbsp; 0 ', Then &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; difference of&amp;nbsp; Total Collectable amount and Total Reason Amount will assigned to max of&amp;nbsp; value either it is Reason_RM and Reason_Fin_Closure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Find the attached&amp;nbsp; jpeg for refrence.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Akumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2012 06:57:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Reg-How-to-make-an-expression/m-p/335339#M587</guid>
      <dc:creator>sona_sa</dc:creator>
      <dc:date>2012-05-04T06:57:43Z</dc:date>
    </item>
    <item>
      <title>Reg : How to make an expression</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Reg-How-to-make-an-expression/m-p/335340#M588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Akumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had short time to read this post but I believe that what you can do is first, nest the necessary ifs with the conditions you have, for example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if((Net_Collectable_Amount &amp;gt; Total_Reason_Amount) and (Reason_PE&amp;gt;0 or Reason..)&lt;/P&gt;&lt;P&gt;,Net_Collectable_Amount,&amp;nbsp; //ends first condition&lt;/P&gt;&lt;P&gt;//starts second condition&lt;/P&gt;&lt;P&gt;if(Net_Collectable_Amount &amp;gt; Total_Reason_Amount and Reason_RM=0 and Reason_Fin_Closure=0,vResult2,//ends second if&lt;/P&gt;&lt;P&gt;//starts third condition&lt;/P&gt;&lt;P&gt;if(...etc)&lt;/P&gt;&lt;P&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After you do this, apply some "divide and conquer", create a variable that contains the final result calculation applied to all the conditions you have.&lt;/P&gt;&lt;P&gt;For example for your condition 1.&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;1. Total Collectable amount is greater than Total Reason Amount and Only the Reason_Project is greater then zero and the entire column is zero,&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; then assign the Total Collectable amount to that particular Reason_Project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create a variable such as vResult1 and put in there the formula for the desired result, do this until you complete all your conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll try reviewing this question later when I have a little more time, hope this can help in the meantime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2012 22:24:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Reg-How-to-make-an-expression/m-p/335340#M588</guid>
      <dc:creator />
      <dc:date>2012-05-14T22:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: Reg : How to make an expression</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Reg-How-to-make-an-expression/m-p/335341#M589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jorge,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am explaining with example, Please go through the attached jpeg file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the top &lt;STRONG&gt;Net Collectable as per milestone&lt;/STRONG&gt; - 1887.8, &lt;STRONG&gt;Reason Code Amount&lt;/STRONG&gt; - 1509.064 and &lt;STRONG&gt;Net Collecable after reason&lt;/STRONG&gt; - 447.7841&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Net Collectable as per milestone = Reason Code Amount + Net Collecable after reason&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reason Code Amount = Land + LD Claim Amount + NOC + Projects + Early RR + Others + Invoice + PE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Net Collecable after reason = RM + Fin Closure&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All these amount are coming on the behalf of some reason and at a time there is 2 reason amount will be availale&lt;STRONG&gt; (e.g - either LAND + Project or NOC + PE etc...) &lt;/STRONG&gt;which is equal to the&lt;STRONG&gt; NET Collectable as per milestone.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose the sum of these to reason amount is greater than &lt;STRONG&gt;NET Collectable as per milestone, &lt;/STRONG&gt;Than we have to find which reason have&lt;STRONG&gt; max value &lt;/STRONG&gt;and then&lt;STRONG&gt; assign to them whatever NET Collectable as per milestone &lt;/STRONG&gt;amount is available&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try to resolve. Please revert to me for any clarification.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thanks in advance.&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 04:49:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Reg-How-to-make-an-expression/m-p/335341#M589</guid>
      <dc:creator>sona_sa</dc:creator>
      <dc:date>2012-05-15T04:49:16Z</dc:date>
    </item>
  </channel>
</rss>

