<?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: Calculation problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculation-problem/m-p/497965#M552256</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The set analysis expression calculates one set for the entire chart, not a set per row. Perhaps the firstsortedvalue can be used: firstsortedvalue(MENGE, DATUM)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Oct 2013 14:06:09 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2013-10-21T14:06:09Z</dc:date>
    <item>
      <title>Calculation problem</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problem/m-p/497962#M552253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I came across a quiet weird problem. I posted a picture so you should look at it I have a min Date to every product and I try to calculate now how many pieces I had in stock on the min date of my product. so the product 712486 I had in stock on the 05.06.2012 in stock the first time and I had 10 piece of it. so my second product 726751 I had in stock the first time on the 30.10.2012 so far so good but QV still calculates the pieces i had in stock for the 05.05.2012 but I want it for 30.10.2012. Can anyone help me to fix this pivot table??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;MT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 12:14:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problem/m-p/497962#M552253</guid>
      <dc:creator />
      <dc:date>2013-10-21T12:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation problem</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problem/m-p/497963#M552254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What if you make a simple set analysis as two separate expressions&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Period&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;$(=MIN(Period))&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Menge&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Period&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;$(=MAX(Period))&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Menge )&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Tormod Hanstad&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 13:02:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problem/m-p/497963#M552254</guid>
      <dc:creator>thanstad</dc:creator>
      <dc:date>2013-10-21T13:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation problem</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problem/m-p/497964#M552255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you looked at the picture I posted if I do the set analysis sum({&amp;lt;min(...)&amp;gt;}MENGE) it only calculates the stock right for the product we got delivered first. so the pivot table doesnt use the min(date) for each row right in the set analysis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 13:05:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problem/m-p/497964#M552255</guid>
      <dc:creator />
      <dc:date>2013-10-21T13:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation problem</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problem/m-p/497965#M552256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The set analysis expression calculates one set for the entire chart, not a set per row. Perhaps the firstsortedvalue can be used: firstsortedvalue(MENGE, DATUM)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 14:06:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problem/m-p/497965#M552256</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-10-21T14:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation problem</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problem/m-p/497966#M552257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Magdalena,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Either try the suggestion from GW, or create a field in the data model:&lt;/P&gt;&lt;P&gt;min(Datum) as FirstOrderDatePerProduct&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 14:14:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problem/m-p/497966#M552257</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-10-21T14:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation problem</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problem/m-p/497967#M552258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the quick response but all you suggestions didn't work because also when I save the firstoderdateperproduct i still come across the same issue. because every produkt has a different FirstOrderDatePerProduct. i am using now this in my set analysis or did I understand something wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;MT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Oct 2013 11:24:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problem/m-p/497967#M552258</guid>
      <dc:creator />
      <dc:date>2013-10-22T11:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation problem</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problem/m-p/497968#M552259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is expected that each Product has its own FirstOrderDatePerProduct.&amp;nbsp; The expression in your table probably should be:&lt;BR /&gt;sum(if(FirstOrderDatePerProduct=DATUM, MENGE))&lt;BR /&gt;But I could be wrong without knowing what the data is about and what MENGE means.&amp;nbsp; In this case the problem is not with the pivot table but in the overall data model design.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Oct 2013 12:24:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problem/m-p/497968#M552259</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-10-22T12:24:09Z</dc:date>
    </item>
  </channel>
</rss>

