<?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: How to make my both 2 expression display GP = 50.2% ? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122250#M631389</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I checked your whole script and unable to find cost and sales... now how can I advice your what to write to get profit_amount in script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Jun 2016 13:53:30 GMT</pubDate>
    <dc:creator>MK_QSL</dc:creator>
    <dc:date>2016-06-27T13:53:30Z</dc:date>
    <item>
      <title>How to make my both 2 expression display GP = 50.2% ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122243#M631373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below expression return correct GP = 50.2% :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1-&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;year = {$(=max(year)-1)}, month = {"&amp;lt;=$(=max({&amp;lt;year={$(=max(year))}&amp;gt;} month))"}&amp;gt;} cost)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;year = {$(=max(year)-1)}, month = {"&amp;lt;=$(=max({&amp;lt;year={$(=max(year))}&amp;gt;} month))"}&amp;gt;} sales)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is because below 2 load script are working fine :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(@241:248T = '2',@137:151T*-1,@137:151T) as [sales],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(@241:248T = '2',@122:135T*-1,@122:135T) as [cost],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below return wrong GP = 49% :-&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;year = {$(=max(year)-1)}, month = {"&amp;lt;=$(=max({&amp;lt;year={$(=max(year))}&amp;gt;} month))"}&amp;gt;} profit_amt)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;year = {$(=max(year)-1)}, month = {"&amp;lt;=$(=max({&amp;lt;year={$(=max(year))}&amp;gt;} month))"}&amp;gt;} sales)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is because below script is not working fine :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(@241:248T = '2',@137:151T*-1,@137:151T)- (@122:135T ) as profit_amt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope some one can help me modify the above script, so that i can get the same GP% for above 2 expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2016 13:14:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122243#M631373</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2016-06-27T13:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to make my both 2 expression display GP = 50.2% ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122244#M631375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my qvw&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2016 13:15:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122244#M631375</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2016-06-27T13:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to make my both 2 expression display GP = 50.2% ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122245#M631380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check your profit calculation...&lt;/P&gt;&lt;P&gt;It's wrong for 2015, January... 2015, March (for example)&lt;/P&gt;&lt;P&gt;I mean sales-cost must equal to profit_amt which is not fulfilling.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2016 13:38:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122245#M631380</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2016-06-27T13:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to make my both 2 expression display GP = 50.2% ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122246#M631384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I aware profit_amt is wrong , in load script I have sales and cost field, how to make use of these 2 field to compute the right profit_amt in load script ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As now my load script for profit_amt field is wrong .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sent from my iPhone&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2016 13:44:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122246#M631384</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2016-06-27T13:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to make my both 2 expression display GP = 50.2% ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122247#M631386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(SUM(Sales)-SUM(Cost)/SUM(Cost)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Profit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 - (SUM(Sales)/SUM(Cost))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2016 13:46:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122247#M631386</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2016-06-27T13:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to make my both 2 expression display GP = 50.2% ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122248#M631387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manish &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am aware how to write in expression for get the correct GP%.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I don't know is load script for profit_amt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I refer to how to write load script for profit_amt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you share with me how to modify it ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sent from my iPhone&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2016 13:51:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122248#M631387</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2016-06-27T13:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to make my both 2 expression display GP = 50.2% ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122249#M631388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If my profit_amt field load script is correct , then my both expression will return same GP%.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sent from my iPhone&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2016 13:53:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122249#M631388</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2016-06-27T13:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to make my both 2 expression display GP = 50.2% ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122250#M631389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I checked your whole script and unable to find cost and sales... now how can I advice your what to write to get profit_amount in script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2016 13:53:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122250#M631389</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2016-06-27T13:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to make my both 2 expression display GP = 50.2% ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122251#M631390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;241:248T = '2',@137:151T*-1,@137:151T) as ,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;if(@241:248T = '2',@122:135T*-1,@122:135T) as ,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Can you pls help me combine above 2 into profit_amt ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sent from my iPhone&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2016 13:58:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122251#M631390</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2016-06-27T13:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to make my both 2 expression display GP = 50.2% ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122252#M631391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Honestly speaking,,, I don't understand what this expression is about...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2016 14:00:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122252#M631391</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2016-06-27T14:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to make my both 2 expression display GP = 50.2% ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122253#M631392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cost field 122:135T and sales field 137:151T :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;241 is the sign either +ve or -ve represent as 1 or 2 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(@241:248T = '2',@122:135T*-1,@122:135T) as [cost],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;if(@241:248T = '2',@137:151T*-1,@137:151T) as [sales],&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2016 14:06:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122253#M631392</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2016-06-27T14:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to make my both 2 expression display GP = 50.2% ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122254#M631393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;TABLE style="border: 0px; font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="padding-right: 4px; padding-left: 4px; border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;/TD&gt;&lt;TD style="padding-right: 4px; padding-left: 4px; border: 0px; font-style: inherit; font-family: inherit;"&gt;if(@241:248T = '2',@137:151T*-1,@137:151T) -&amp;nbsp; &lt;SPAN style="line-height: 1.5em;"&gt;if(@241:248T = '2',@122:135T*-1,@122:135T)&amp;nbsp; as Profit&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2016 14:19:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122254#M631393</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2016-06-27T14:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to make my both 2 expression display GP = 50.2% ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122255#M631394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now my GP% for both expression are very closed. almost correct now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2016 14:25:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-make-my-both-2-expression-display-GP-50-2/m-p/1122255#M631394</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2016-06-27T14:25:44Z</dc:date>
    </item>
  </channel>
</rss>

