<?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: Formula with 2 calculations from different context in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Formula-with-2-calculations-from-different-context/m-p/2055256#M86702</link>
    <description>&lt;P&gt;.&lt;/P&gt;</description>
    <pubDate>Thu, 30 Mar 2023 14:55:06 GMT</pubDate>
    <dc:creator>bentley32</dc:creator>
    <dc:date>2023-03-30T14:55:06Z</dc:date>
    <item>
      <title>Formula with 2 calculations from different context</title>
      <link>https://community.qlik.com/t5/App-Development/Formula-with-2-calculations-from-different-context/m-p/2055176#M86690</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do struggle with a combined formula,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;when i run it speretaley :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if('$(=$(vlast_Month))'=M_PEC,Rangeavg(below(Total SUM(IF(M_ENC_SINCE_PEC=1 AND M_SINCE_PEC&amp;gt;1,ENC,0))/SUM(MONTANT),2,6)))&lt;/P&gt;
&lt;P&gt;and this one :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if('$(=$(vlast_Month2))'=M_PEC,sum ( CONFIE_PEC))&lt;/P&gt;
&lt;P&gt;Both will work but when i run the in the same formula by multuplying the first one by the second one it wont work,&lt;/P&gt;
&lt;P&gt;I know why, since the first one is on a different row (different month) then the second one,&lt;/P&gt;
&lt;P&gt;With Tableau i would use windows calculation but i dont know how to fix it in QLik&lt;/P&gt;
&lt;P&gt;Thanks for your help&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 12:49:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Formula-with-2-calculations-from-different-context/m-p/2055176#M86690</guid>
      <dc:creator>bentley32</dc:creator>
      <dc:date>2023-03-30T12:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: Formula with 2 calculations from different context</title>
      <link>https://community.qlik.com/t5/App-Development/Formula-with-2-calculations-from-different-context/m-p/2055256#M86702</link>
      <description>&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 14:55:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Formula-with-2-calculations-from-different-context/m-p/2055256#M86702</guid>
      <dc:creator>bentley32</dc:creator>
      <dc:date>2023-03-30T14:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: Formula with 2 calculations from different context</title>
      <link>https://community.qlik.com/t5/App-Development/Formula-with-2-calculations-from-different-context/m-p/2055270#M86704</link>
      <description>&lt;P&gt;If you mean that both calculations work side by side within a single object they should be also work together. But you if mean that it are different objects it won't work. In this case you may consider to force both into a single object - maybe with some aggr() constructs and/or changes to the data-model and/or to the general calculating logic.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 15:06:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Formula-with-2-calculations-from-different-context/m-p/2055270#M86704</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-03-30T15:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: Formula with 2 calculations from different context</title>
      <link>https://community.qlik.com/t5/App-Development/Formula-with-2-calculations-from-different-context/m-p/2055271#M86705</link>
      <description>&lt;P&gt;the result of the first one is in a row of a dimension (dates) and the result of the second also in the the dates but in a different row&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 15:09:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Formula-with-2-calculations-from-different-context/m-p/2055271#M86705</guid>
      <dc:creator>bentley32</dc:creator>
      <dc:date>2023-03-30T15:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: Formula with 2 calculations from different context</title>
      <link>https://community.qlik.com/t5/App-Development/Formula-with-2-calculations-from-different-context/m-p/2055290#M86707</link>
      <description>&lt;P&gt;Yes, this won't work - both must be on one row. You should consider to remove the date dimension or replacing it with DAY which hasn't a direct relation to month and year and which may enable you to put the results from the current month side by side to previous months.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 15:31:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Formula-with-2-calculations-from-different-context/m-p/2055290#M86707</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-03-30T15:31:59Z</dc:date>
    </item>
  </channel>
</rss>

