<?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: Min date doesn't work with Sum in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Min-date-doesn-t-work-with-Sum/m-p/501448#M187383</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you defined your variable in variable overview with a leading equal sign or without? Try with an equal sign&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=min(uDAY)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and check the result in a text box:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=vPeriodStart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then, if you get an expected result, try&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;sum(&lt;SPAN style="color: blue;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: maroon;"&gt;Opening&lt;/SPAN&gt; &amp;gt; &lt;EM&gt;&lt;STRONG style="color: gray;"&gt;vPeriodStart&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;SPAN style="color: blue;"&gt;or&lt;/SPAN&gt; &lt;SPAN style="color: maroon;"&gt;ClosingDate&lt;/SPAN&gt;&lt;BR /&gt;&amp;lt; &lt;EM&gt;&lt;STRONG style="color: gray;"&gt;vPeriodStart&lt;/STRONG&gt;&lt;/EM&gt; ,0,1))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Sep 2013 08:38:40 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2013-09-10T08:38:40Z</dc:date>
    <item>
      <title>Min date doesn't work with Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Min-date-doesn-t-work-with-Sum/m-p/501447#M187382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; Hello All,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I am trying to calculate an indicator using minimum date. So i set a&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt;variable called 'vPeriodStart' like this&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;vPeriodStart= &lt;SPAN style="color: blue;"&gt;min&lt;/SPAN&gt;(&lt;SPAN style="color: maroon;"&gt;uDAY&lt;/SPAN&gt;) and it gives the earliest date back for a selected fiscal period. Now if i want to use this variable like this&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;sum(&lt;SPAN style="color: blue;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: maroon;"&gt;Opening&lt;/SPAN&gt; &amp;gt; &lt;EM&gt;&lt;STRONG style="color: gray;"&gt;$(vPeriodStart)&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;SPAN style="color: blue;"&gt;or&lt;/SPAN&gt; &lt;SPAN style="color: maroon;"&gt;ClosingDate&lt;/SPAN&gt;&lt;BR /&gt;&amp;lt; &lt;EM&gt;&lt;STRONG style="color: gray;"&gt;$(vPeriodStart)&lt;/STRONG&gt;&lt;/EM&gt; ,0,1)) it&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt;does not work. I also tried &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;sum(&lt;SPAN style="color: blue;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: maroon;"&gt;Opening&lt;/SPAN&gt; &amp;gt;&lt;SPAN style="color: blue;"&gt;min&lt;/SPAN&gt;(&lt;SPAN style="color: maroon;"&gt;uDAY&lt;/SPAN&gt;) or ClosingDate &amp;lt; &lt;SPAN style="color: blue;"&gt;min&lt;/SPAN&gt;(&lt;SPAN style="color: maroon;"&gt;uDAY&lt;/SPAN&gt;),0,1)) but same result it gives me no value back.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;i also tried to format date in every&lt;BR /&gt;possible way with Date and Date# it does not work. I am confused why i am&lt;BR /&gt;unable to use Min(Date) function in sum formula. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;now i if set the value of variable &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;vPeriodStart= &lt;SPAN style="color: blue;"&gt;today()&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;vPeriodStart=&lt;SPAN style="color: blue;"&gt;'09.09.2013'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; it works&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;&lt;SPAN style="color: #000000;"&gt;Now i need to make it works with&lt;/SPAN&gt; vPeriodStart= &lt;SPAN style="color: blue;"&gt;min&lt;/SPAN&gt;(&lt;SPAN style="color: maroon;"&gt;uDAY&lt;/SPAN&gt;) I&lt;SPAN style="color: #000000;"&gt; tried every possible way but it not working. I am wondering if anybody can help me this&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Thnaks&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 08:33:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-date-doesn-t-work-with-Sum/m-p/501447#M187382</guid>
      <dc:creator />
      <dc:date>2013-09-10T08:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Min date doesn't work with Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Min-date-doesn-t-work-with-Sum/m-p/501448#M187383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you defined your variable in variable overview with a leading equal sign or without? Try with an equal sign&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=min(uDAY)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and check the result in a text box:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=vPeriodStart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then, if you get an expected result, try&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;sum(&lt;SPAN style="color: blue;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: maroon;"&gt;Opening&lt;/SPAN&gt; &amp;gt; &lt;EM&gt;&lt;STRONG style="color: gray;"&gt;vPeriodStart&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;SPAN style="color: blue;"&gt;or&lt;/SPAN&gt; &lt;SPAN style="color: maroon;"&gt;ClosingDate&lt;/SPAN&gt;&lt;BR /&gt;&amp;lt; &lt;EM&gt;&lt;STRONG style="color: gray;"&gt;vPeriodStart&lt;/STRONG&gt;&lt;/EM&gt; ,0,1))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 08:38:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-date-doesn-t-work-with-Sum/m-p/501448#M187383</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-09-10T08:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Min date doesn't work with Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Min-date-doesn-t-work-with-Sum/m-p/501449#M187384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I tried the = sign it does not work. I already tested the output of variable in a text box it works fine and it gives the minimum date back.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 08:45:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-date-doesn-t-work-with-Sum/m-p/501449#M187384</guid>
      <dc:creator />
      <dc:date>2013-09-10T08:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: Min date doesn't work with Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Min-date-doesn-t-work-with-Sum/m-p/501450#M187385</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;I seem to think that this is with regards to the format of the returned value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Put an Input box and list box on a sheet and compare the &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: maroon;"&gt;Opening&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp; and &lt;/SPAN&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit; color: gray;"&gt;$(vPeriodStart) &lt;/STRONG&gt;&lt;/EM&gt;values to each other.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this doenst work, do you mind send a Qvw model? Might give a better picture of whats going wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 08:51:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-date-doesn-t-work-with-Sum/m-p/501450#M187385</guid>
      <dc:creator />
      <dc:date>2013-09-10T08:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: Min date doesn't work with Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Min-date-doesn-t-work-with-Sum/m-p/501451#M187386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am assuming that your Opening and ClosingDate are QV dates, with a numeric representation, right?&lt;/P&gt;&lt;P&gt;And your variable is also a number, right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 08:52:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-date-doesn-t-work-with-Sum/m-p/501451#M187386</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-09-10T08:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Min date doesn't work with Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Min-date-doesn-t-work-with-Sum/m-p/501452#M187387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Isn't this a case of nested aggregation? It certainly works when you set variable vPeriodStart in your load script. But then you loose Fiscal Period selection...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 08:53:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-date-doesn-t-work-with-Sum/m-p/501452#M187387</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2013-09-10T08:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Min date doesn't work with Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Min-date-doesn-t-work-with-Sum/m-p/501453#M187388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it's not a nested aggregation when you define your variable with a leading equal sign, so the variable will be replaced by the result, not the function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 08:56:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-date-doesn-t-work-with-Sum/m-p/501453#M187388</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-09-10T08:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Min date doesn't work with Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Min-date-doesn-t-work-with-Sum/m-p/501454#M187389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried both numeric and Date representation both doesn't work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 09:15:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-date-doesn-t-work-with-Sum/m-p/501454#M187389</guid>
      <dc:creator />
      <dc:date>2013-09-10T09:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Min date doesn't work with Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Min-date-doesn-t-work-with-Sum/m-p/501455#M187390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please find the attached QVW file for example&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 09:20:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-date-doesn-t-work-with-Sum/m-p/501455#M187390</guid>
      <dc:creator />
      <dc:date>2013-09-10T09:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Min date doesn't work with Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Min-date-doesn-t-work-with-Sum/m-p/501456#M187391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As said, you need to use a leading equal sign (which was missing in your app) in the variable definition and you need to create a number:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;min&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;uDAY&lt;/SPAN&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;in variable overview. Result of you expression is then 189.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 09:29:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-date-doesn-t-work-with-Sum/m-p/501456#M187391</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-09-10T09:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Min date doesn't work with Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Min-date-doesn-t-work-with-Sum/m-p/501457#M187392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u made my day thank you very much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sameer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 10:00:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-date-doesn-t-work-with-Sum/m-p/501457#M187392</guid>
      <dc:creator />
      <dc:date>2013-09-10T10:00:29Z</dc:date>
    </item>
  </channel>
</rss>

