<?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: Issue with the Beginning Value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Issue-with-the-Beginning-Value/m-p/571417#M212899</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try to add this expression to your "Chart with a question"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;subfield(concat(total aggr(Sum({$ &amp;lt;[Type of rec] = {'Inventory'}&amp;gt;} [Mkt Val]), Period ), '-', Period), '-', 1)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Feb 2014 21:44:14 GMT</pubDate>
    <dc:creator>maxgro</dc:creator>
    <dc:date>2014-02-11T21:44:14Z</dc:date>
    <item>
      <title>Issue with the Beginning Value</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-the-Beginning-Value/m-p/571415#M212897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;I need to create a turnover Ratio. The turnover ratio will have numerator as sum of transactions over specific days and then divide it by beginning value of the corresponding period.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;The data will be like &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Tran&amp;nbsp; day 1&amp;nbsp; 10&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Tran&amp;nbsp; day 2&amp;nbsp; 10&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Tran&amp;nbsp; day 3&amp;nbsp; 10&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Tran&amp;nbsp; day 4&amp;nbsp; 10&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Tran&amp;nbsp; day .&amp;nbsp;&amp;nbsp; 10&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Tran&amp;nbsp; day 30 10&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Inve&amp;nbsp;&amp;nbsp;&amp;nbsp; day 1 200&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;The ratio should give me&amp;nbsp; (300/200) =&amp;nbsp; 1.5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;This ratio should be displayed as running ratio for last 30/60/90 days. So we have created one 30-60-90 days calendar which provides corresponding 30-60-90 days for given period.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Im not able to get the beginning of Inv value consistently. It comes only for the first record, that too after the selection is made. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Any idea why the values are not displayed for other rows .. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 18:57:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-the-Beginning-Value/m-p/571415#M212897</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-11T18:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with the Beginning Value</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-the-Beginning-Value/m-p/571416#M212898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nilesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the below, as I was not able to run your QVW , I did the below. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Created a new QVW with the below code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BINARY Inv POC.qvw;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET ThousandSep=',';&lt;/P&gt;&lt;P&gt;SET DecimalSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyThousandSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyDecimalSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyFormat='$#,##0.00;($#,##0.00)';&lt;/P&gt;&lt;P&gt;SET TimeFormat='h:mm:ss TT';&lt;/P&gt;&lt;P&gt;SET DateFormat='M/D/YYYY';&lt;/P&gt;&lt;P&gt;SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';&lt;/P&gt;&lt;P&gt;SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';&lt;/P&gt;&lt;P&gt;SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop field minperiod;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NewtABLE:&lt;/P&gt;&lt;P&gt;LOAD AsOfPeriod,&lt;/P&gt;&lt;P&gt;&amp;nbsp; date(Period-359,'MM/DD/YYYY') as min_last_360,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(Period-269,'MM/DD/YYYY') as min_last_270,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(Period-179,'MM/DD/YYYY') as min_last_180,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(Period-89,'MM/DD/YYYY') as min_last_90,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(Period-59,'MM/DD/YYYY') as min_last_60,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(Period-29,'MM/DD/YYYY') as min_last_30&lt;/P&gt;&lt;P&gt;Resident&amp;nbsp; [CALENDAR_30_60_90]&lt;/P&gt;&lt;P&gt;where same_day = 'Y';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;test:&lt;/P&gt;&lt;P&gt;Crosstable &lt;/P&gt;&lt;P&gt;(Category, Period,1) Load * Resident NewtABLE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP table NewtABLE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate('CALENDAR_30_60_90')&lt;/P&gt;&lt;P&gt;load distinct * ,&lt;/P&gt;&lt;P&gt;'Turover' as source&lt;/P&gt;&lt;P&gt;resident test;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP table test;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Change the expression of Beg Mkt val as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;nbsp; sum(&amp;nbsp;&amp;nbsp; aggr( DISTINCT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; sum( {&amp;lt;Last = {'last_30'}, [Type of rec] = {'Inventory'}, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Period= {'$(=date($(vMinPeriod)))'}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;} [Mkt Val]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , Period&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I was not able to do it on your file, may be it is not optimized script.&lt;/P&gt;&lt;P&gt;What you should do is remove the join Add this as new record set. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;join([CALENDAR_30_60_90])&lt;/P&gt;&lt;P&gt;LOAD AsOfPeriod,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; NewAsOfPeriod,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Period,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Last,&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(Last = 'last_360',date(AsOfPeriod-359,'MM/DD/YYYY'),&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(Last = 'last_270',date(AsOfPeriod-269,'MM/DD/YYYY'),&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(Last = 'last_180',date(AsOfPeriod-179,'MM/DD/YYYY'),&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(Last = 'last_90',date(AsOfPeriod-89,'MM/DD/YYYY'),&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(Last = 'last_60',date(AsOfPeriod-59,'MM/DD/YYYY'),&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(Last = 'last_30',date(AsOfPeriod-29,'MM/DD/YYYY'),NULL())&lt;/P&gt;&lt;P&gt;&amp;nbsp; ))))) as minperiod&lt;/P&gt;&lt;P&gt;Resident&amp;nbsp; [CALENDAR_30_60_90];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 20:57:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-the-Beginning-Value/m-p/571416#M212898</guid>
      <dc:creator />
      <dc:date>2014-02-11T20:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with the Beginning Value</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-the-Beginning-Value/m-p/571417#M212899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try to add this expression to your "Chart with a question"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;subfield(concat(total aggr(Sum({$ &amp;lt;[Type of rec] = {'Inventory'}&amp;gt;} [Mkt Val]), Period ), '-', Period), '-', 1)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 21:44:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-the-Beginning-Value/m-p/571417#M212899</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-02-11T21:44:14Z</dc:date>
    </item>
  </channel>
</rss>

