<?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: Profit and Loss Script Issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Profit-and-Loss-Script-Issue/m-p/1772664#M591277</link>
    <description>&lt;P&gt;can you attach a QVW?&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jan 2021 18:45:57 GMT</pubDate>
    <dc:creator>edwin</dc:creator>
    <dc:date>2021-01-07T18:45:57Z</dc:date>
    <item>
      <title>Profit and Loss Script Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Profit-and-Loss-Script-Issue/m-p/1772338#M591276</link>
      <description>&lt;P&gt;I need help regarding my Profit and Lost table expression that works on Actuals (Jan-20, Feb-20, Mar-20 columns), however the +/- sign is negative for Budget numbers (Apr-20, May-20, Jun-20 columns) and the Contribution Margin % wont calculate. My current selections are the&amp;nbsp;Actuals (Jan-20, Feb-20, Mar-20 columns) in this example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="temp1.png" style="width: 872px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/46504iC4A7DE41DEFE3C70/image-size/large?v=v2&amp;amp;px=999" role="button" title="temp1.png" alt="temp1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SCRIPT:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;vMonth=Max([Month Year])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=If(PLSign=1,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Num(if(Only({1}[Month Year])&amp;lt;=&lt;STRONG&gt;&lt;EM&gt;vMonth&lt;/EM&gt;&lt;/STRONG&gt;, sum({&amp;lt;[Month Year],Ledger_Type={'Actual'}&amp;gt;}-Amount), sum({&amp;lt;[Month Year],Ledger_Type={'Plan'}&amp;gt;}-Amount)),'#,##0;(#,##0)')&lt;BR /&gt;&amp;nbsp; ,If(PLLevel = 'p'&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , Num(if(Only({1}[Month Year])&amp;lt;=&lt;STRONG&gt;&lt;EM&gt;vMonth&lt;/EM&gt;&lt;/STRONG&gt;, sum({&amp;lt;[Month Year],Ledger_Type={'Actual'}&amp;gt;}-Amount), sum({&amp;lt;[Month Year],Ledger_Type={'Plan'}&amp;gt;}-Amount))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /if(Only({1}[Month Year])&amp;lt;=&lt;STRONG&gt;&lt;EM&gt;vMonth&lt;/EM&gt;&lt;/STRONG&gt;, sum({&amp;lt;[Month Year],Ledger_Type={'Actual'}&amp;gt;}If(Object_Account&amp;gt;='400000' AND Object_Account&amp;lt;='499999',-Amount)), sum({&amp;lt;[Month Year],Ledger_Type={'Plan'}&amp;gt;}If(Object_Account&amp;gt;='400000' AND Object_Account&amp;lt;='499999',-Amount))),'#,##0.0%')&lt;BR /&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(Num(if(Only({1}[Month Year])&amp;lt;=&lt;STRONG&gt;&lt;EM&gt;vMonth&lt;/EM&gt;&lt;/STRONG&gt;, sum({&amp;lt;[Month Year],Ledger_Type={'Actual'}&amp;gt;}-Amount), sum({&amp;lt;[Month Year],Ledger_Type={'Plan'}&amp;gt;}-Amount)), '#,##0;(#,##0)')&lt;BR /&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;&amp;nbsp; , Num(if(Only({1}[Month Year])&amp;lt;=&lt;STRONG&gt;&lt;EM&gt;vMonth&lt;/EM&gt;&lt;/STRONG&gt;, sum({&amp;lt;[Month Year],Ledger_Type={'Actual'}&amp;gt;}Amount), sum({&amp;lt;[Month Year],Ledger_Type={'Plan'}&amp;gt;}Amount)), '#,##0;(#,##0)')&lt;BR /&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; )&lt;BR /&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; )&lt;BR /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Other notes:&amp;nbsp;the PLSign is to switch sign since the data base shows revenue as a negative. PLLevel with a P identifies the PL Group should be a “%”.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 17:38:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Profit-and-Loss-Script-Issue/m-p/1772338#M591276</guid>
      <dc:creator>PrimBITEXAS</dc:creator>
      <dc:date>2024-11-16T17:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Profit and Loss Script Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Profit-and-Loss-Script-Issue/m-p/1772664#M591277</link>
      <description>&lt;P&gt;can you attach a QVW?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 18:45:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Profit-and-Loss-Script-Issue/m-p/1772664#M591277</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-01-07T18:45:57Z</dc:date>
    </item>
  </channel>
</rss>

