<?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: Limiting data using Only-function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284318#M499595</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 May 2011 08:37:31 GMT</pubDate>
    <dc:creator>IAMDV</dc:creator>
    <dc:date>2011-05-11T08:37:31Z</dc:date>
    <item>
      <title>Limiting data using Only-function</title>
      <link>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284309#M499586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;I have sales data that I'm trying to limit in table/chart using Only-function in Expression. &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;DIV&gt;Sum&lt;/DIV&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[YEAR]&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;$(=Only([YEAR]))&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt; &lt;/EM&gt;&lt;SPAN style="color: #808080; font-size: 8pt;"&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;Sales&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;Now I'm trying to limit the data also with month, but without any success. Is it possible to limit things using Only-function several times like this?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;DIV&gt;Sum&lt;/DIV&gt;&lt;/SPAN&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;DIV&gt;&lt;STRONG style="color: #ff0000; font-size: 8pt;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #ff0000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[YEAR]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[YEAR]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-1, {$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[MONTH]&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;$(=Only([AsOfMonth]))&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt; &lt;/EM&gt;&lt;SPAN style="color: #808080; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;I know, this does not work. The idea here is to limit year to be last year and month should be selected.&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Second question: I shoul also calculate last 12 months sales from same table. There is date, month, year etc available. What would be the best way to do that?&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the sample report.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2011 10:44:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284309#M499586</guid>
      <dc:creator />
      <dc:date>2011-05-09T10:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting data using Only-function</title>
      <link>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284310#M499587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana,geneva;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana,geneva;"&gt;I had very similar requirement sometime back. And I had used variables to get this working. I had created some variables like this...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana,geneva;"&gt;vCurrentYear&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Max({1} Year)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana,geneva;"&gt;vPreviouYear&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Max({1} Year) - 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana,geneva;"&gt;vCurrentMonth&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Max({1&amp;lt;Year = {$(=$(vMaxYear))}&amp;gt;} MonthNumber)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana,geneva;"&gt;vPreviouMonthLastYear&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($(vCurrentMonthNumber) = 1, 12, $(vCurrentMonthNumber) - 1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana,geneva;"&gt;I had declared the variables in the load script and everytime I load the data...variables will be updated. Then I had variables within my expression and calculated the sales data for the above time periods.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana,geneva;"&gt;I hope this helps!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana,geneva;"&gt;Good luck.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana,geneva;"&gt;Cheers - DV&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana,geneva;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2011 12:01:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284310#M499587</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2011-05-09T12:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting data using Only-function</title>
      <link>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284311#M499588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana,geneva;"&gt;If you need further help, then please upload your QV document with some data. I'll can look into the QV document.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana,geneva;"&gt;Cheers - DV&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2011 12:18:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284311#M499588</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2011-05-09T12:18:26Z</dc:date>
    </item>
    <item>
      <title>Limiting data using Only-function</title>
      <link>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284312#M499589</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;You'll find a sample from first message. I hope it's understandable. First problem is to limit data to one year and month at the same time in column "Month last year". Second is to get sum of last 12 months into last column. I've tried to solve these problem on report so far. For cumulative numbers I made a "asof" table according to instructions on this site and that helped with that problem. Please ask, if you need more information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR, Ville&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2011 13:54:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284312#M499589</guid>
      <dc:creator />
      <dc:date>2011-05-09T13:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting data using Only-function</title>
      <link>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284313#M499590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; If there is a solution, I would like to know about it... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2011 11:03:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284313#M499590</guid>
      <dc:creator />
      <dc:date>2011-05-10T11:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting data using Only-function</title>
      <link>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284314#M499591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;Ville - Sorry I was busy with work. I am not sure if I had fully understood the requirement. But I had created an expression for [Month last year] column in the QV document for Fakta table. Here is the expression...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&lt;STRONG style="font-family: trebuchet ms,geneva;"&gt;Sum({1&amp;lt;[MONTH]={$(=Only([AsOfMonth]))}, YEAR ={$(=($(vMyYear))-1)} &amp;gt;} LaskutettuSumma)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;Before using this expression, I had created a variable in Variable Overiew Window (Although you can move this variable in the Load Script, because you just need to evaluate the variable only once when you load the data. This variable calculates the maximum year.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&lt;STRONG style="font-family: trebuchet ms,geneva;"&gt;vMyYear = Max({1} YEAR)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;Now irrespective of whatever year I select I would see the Last Year Same Month's data for each dimension listed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;Please let me know if this is what you needed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;Cheers - DV&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2011 11:23:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284314#M499591</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2011-05-10T11:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting data using Only-function</title>
      <link>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284315#M499592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, it works perfectly and it does exactly what it should!!!! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had second question here as well about calculating last 12 months from same data. Here is the original question:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Second question: I shoul also calculate last 12 months sales from same table. There is date, month, year etc available. What would be the best way to do that?"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is the last column in same report, but is just the same as in Cumulative-column?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2011 11:49:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284315#M499592</guid>
      <dc:creator />
      <dc:date>2011-05-10T11:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting data using Only-function</title>
      <link>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284316#M499593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;I am glad that it worked. Thanks for the points as well.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;Here is the idea for the second question. I am assuming that we are not changing the data model, I mean we can add autonumber() for each month in the load script and you can use the monthnumber. However, I am not going that route for this solution. I prefer working on expression without tweaking the original data model. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;I am just creating a new variable which calculates the current month.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&lt;STRONG style="font-family: trebuchet ms,geneva;"&gt;vCurrentMonth = ONLY({$} AsOfMonth)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;And then I am using the Dollar Sign Expansion functionality in QlikView to calculate the data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&lt;STRONG style="font-family: trebuchet ms,geneva;"&gt;Sum({1&amp;lt;YEAR ={$(=($(vMyYear)))}, MONTH = {'&amp;lt;= $(=($(vCurrentMonth))) '} &amp;gt;} LaskutettuSumma) &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&lt;STRONG style="font-family: trebuchet ms,geneva;"&gt;+&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&lt;STRONG style="font-family: trebuchet ms,geneva;"&gt;Sum({1&amp;lt;YEAR ={$(=($(vMyYear))-1)}, MONTH = {'&amp;gt;= $(=($(vCurrentMonth))) '} &amp;gt;} LaskutettuSumma)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;I had not tested the expression. However this should work and let me know if this helps!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;Good luck.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;Cheers - DV&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2011 12:12:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284316#M499593</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2011-05-10T12:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting data using Only-function</title>
      <link>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284317#M499594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again! It worked fine without testing as well, so why bother... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2011 06:01:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284317#M499594</guid>
      <dc:creator />
      <dc:date>2011-05-11T06:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting data using Only-function</title>
      <link>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284318#M499595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2011 08:37:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284318#M499595</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2011-05-11T08:37:31Z</dc:date>
    </item>
    <item>
      <title>Limiting data using Only-function</title>
      <link>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284319#M499596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One more question and almost like previous.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should calculate a four weeks/one month average on week level like this: "Sum(four week sales)/4".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to modify the "12 months"-code, but without success. Should it be something like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variables:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&lt;STRONG style="font-family: trebuchet ms,geneva;"&gt;vCurrentMonth = ONLY({$} AsOfMonth)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&lt;STRONG style="color: #000080; font-family: trebuchet ms,geneva;"&gt;&lt;STRONG style="font-family: trebuchet ms,geneva;"&gt;vCurrentWeek = ONLY({$} WEEK)&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&lt;STRONG style="color: #000080; font-family: trebuchet ms,geneva;"&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="text-decoration: line-through; font-family: trebuchet ms,geneva;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;Formula:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&lt;STRONG style="font-family: trebuchet ms,geneva;"&gt;Sum({1&amp;lt;YEAR ={$(=($(vMyYear)))}, MONTH = {'&amp;lt;= $(=($(vCurrentMonth))) '} &amp;gt;} , WEEK= {'&amp;lt;= $(=($(vCurrentWeek))) '} &amp;gt;} LaskutettuSumma) &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&lt;STRONG style="font-family: trebuchet ms,geneva;"&gt;+&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&lt;STRONG style="font-family: trebuchet ms,geneva;"&gt;Sum({1&amp;lt;YEAR ={$(=($(vMyYear))-1)}, MONTH = {'&amp;gt;= $(=($(vCurrentMonth))) '} &amp;gt;}, WEEK= {'&amp;gt;= $(=($(vCurrentWeek))) '} &amp;gt;} LaskutettuSumma)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&lt;STRONG style="font-family: trebuchet ms,geneva;"&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This obviesly didn't work and neither did the other tricks I've used so far.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2011 12:30:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284319#M499596</guid>
      <dc:creator />
      <dc:date>2011-05-11T12:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting data using Only-function</title>
      <link>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284320#M499597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;The sample file does not have associate logic between week &amp;amp; month. I mean when I select the 1st month it shows (1,2,3,4,5,52,53) - We have more than 4 weeks in the month. And same applies to other months, there are few months without any weeks. So we need fix that issue before we proceed further. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;Also trying to understand the actual requirement. Now we need SUM of Weekly Average for LaskutettuSumma. I mean if we select March for example and we wanted the average of LaskutettuSumma across all 4 weeks of March. Is this right? Please correct me If I am wrong.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;Cheers - DV&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2011 12:46:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284320#M499597</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2011-05-11T12:46:23Z</dc:date>
    </item>
    <item>
      <title>Limiting data using Only-function</title>
      <link>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284321#M499598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it would be easiest to use week. Sum up last 4 weeks sales (LaskutettuSumma) and just divide it with number 4. But this should work also over years, so should the week be eg YYYY-WW (2011-51)? Should some kind of calendar be created for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for example at week 5 we should sum weeks 2-5 and divide that figure with 4 and so on... Here a picture of report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Weekly avg.png" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/4156_Weekly+avg.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2011 13:01:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284321#M499598</guid>
      <dc:creator />
      <dc:date>2011-05-11T13:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting data using Only-function</title>
      <link>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284322#M499599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was assuming that you are integrating the Weekly Average score in the previous table. The idea of calculating week seems to be right (YYYY-WW). Also it will be good idea to populate a calendar table in the load script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers - DV&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2011 08:19:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284322#M499599</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2011-05-12T08:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting data using Only-function</title>
      <link>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284323#M499600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you give me a more practical answer, meaning what should I do? Sorry, but I don't know where to start. Planning seems to be easier than implementing plans.&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2011 08:31:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284323#M499600</guid>
      <dc:creator />
      <dc:date>2011-05-12T08:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting data using Only-function</title>
      <link>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284324#M499601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have any idea why choosing only on costcenter from sample.qvw does not affect on columns "Month last year" and "Last 12 months"? And "Last 12 months" total is ok, but there is something wrong with numbers in rows. Sum of rows doesn't match with total.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2011 08:46:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284324#M499601</guid>
      <dc:creator />
      <dc:date>2011-05-12T08:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting data using Only-function</title>
      <link>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284325#M499602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;That is because our expressions are using {1} instead of current selection {$}.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;We had used the variable to calculate the vMyYear (Max Year) with the following expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;&lt;STRONG&gt;Max({&lt;SPAN style="color: #ff0000;"&gt;1&lt;/SPAN&gt;} YEAR)&lt;/STRONG&gt; - Where represents the full set of all the records in the application&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;Also we had used the same logic on Months...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: trebuchet ms,geneva;"&gt;Sum({&lt;SPAN style="color: #ff0000;"&gt;1&lt;/SPAN&gt;&amp;lt;[MONTH]={$(=Only([AsOfMonth]))}, YEAR ={$(=($(vMyYear))-1)} &amp;gt;} LaskutettuSumma)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;Hope this helps &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;Also I will be looking at your previous post sometime soon. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;Cheers - DV&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2011 09:40:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284325#M499602</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2011-05-12T09:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting data using Only-function</title>
      <link>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284326#M499603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a new example file for you...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2011 10:45:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284326#M499603</guid>
      <dc:creator />
      <dc:date>2011-05-12T10:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting data using Only-function</title>
      <link>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284327#M499604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi D V,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you busy? Are you able to help with this today or on Monday? Sorry, I just have to ask... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2011 11:25:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284327#M499604</guid>
      <dc:creator />
      <dc:date>2011-05-13T11:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting data using Only-function</title>
      <link>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284328#M499605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very sorry! I am working from Client's place. I will look into this over weekend. I hope its okay. Also can you explain me the issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks - DV&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2011 12:45:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limiting-data-using-Only-function/m-p/284328#M499605</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2011-05-13T12:45:27Z</dc:date>
    </item>
  </channel>
</rss>

