<?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: Using calculated value within an expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-calculated-value-within-an-expression/m-p/53899#M771061</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I attached the app with my response above...&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/message/1497294"&gt;Re: Using calculated value within an expression&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;New script&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DailyReturnTest:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Date, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Account, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MV,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MonthName(Date) as MonthYear,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Floor(MonthEnd(Date))) as MonthEnd,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Day(Date(Floor(MonthEnd(Date)))) as LastDay&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM DailyReturnTest.xlsx&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, embedded labels, table is Sheet1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MonthEnd&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Account&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expressions&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({&amp;lt;Date = {"=Floor(Date) = Floor(MonthEnd(Date))"}&amp;gt;}MV)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({&amp;lt;Date = {"=Floor(Date) = Floor(MonthEnd(Date))"}&amp;gt;}Return)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(Sum({&amp;lt;Date = {"=Floor(Date) = Floor(MonthEnd(Date))"}&amp;gt;}MV) &amp;lt;&amp;gt; 0, Avg({&amp;lt;Date&amp;gt;} MV))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(Sum({&amp;lt;Date = {"=Floor(Date) = Floor(MonthEnd(Date))"}&amp;gt;}MV) &amp;lt;&amp;gt; 0, Sum(Return))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(Sum({&amp;lt;Date = {"=Floor(Date) = Floor(MonthEnd(Date))"}&amp;gt;}MV) &amp;lt;&amp;gt; 0, RangeAvg(Above([Monthly Avg. MV], 0, 3)))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Jun 2018 13:10:51 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-06-05T13:10:51Z</dc:date>
    <item>
      <title>Using calculated value within an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Using-calculated-value-within-an-expression/m-p/53896#M771058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm looking to create a rolling 3 month MV expression using another column in my table that is itself a calculated expression ("Monthly Avg. MV"). That original expression is calculating the average MV for a particular month based on daily data in the "Main Table". I am currently using the following expression by referring to the label of the original column in my table but it is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RangeAvg(Above([Monthly Avg. MV],0,3)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, as of 3/31/2015 for Account A, the rolling average 3-month market value should be $55,339.29 which is the average of the average MVs for 1/31/15, 2/28/15 and 3/31/15.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to embed this expression within another expression? Thanks in advance for all your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-calculated-value-within-an-expression/m-p/53896#M771058</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using calculated value within an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Using-calculated-value-within-an-expression/m-p/53897#M771059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I made some script changes to make this work... the only thing which doesn't really match is the Monthly Return... but see if the new ones are actually want you want?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/204371_Capture.PNG" style="height: 385px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2018 12:57:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-calculated-value-within-an-expression/m-p/53897#M771059</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-06-05T12:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: Using calculated value within an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Using-calculated-value-within-an-expression/m-p/53898#M771060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes. It looks like the average MV is being calculated using the column 5 of the table rather than the original data set which is exactly what I want. Can you share the script with me? I'll take a look at the monthly return column once you share that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;BR /&gt;Shaan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2018 13:04:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-calculated-value-within-an-expression/m-p/53898#M771060</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-05T13:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using calculated value within an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Using-calculated-value-within-an-expression/m-p/53899#M771061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I attached the app with my response above...&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/message/1497294"&gt;Re: Using calculated value within an expression&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;New script&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DailyReturnTest:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Date, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Account, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MV,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MonthName(Date) as MonthYear,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Floor(MonthEnd(Date))) as MonthEnd,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Day(Date(Floor(MonthEnd(Date)))) as LastDay&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM DailyReturnTest.xlsx&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, embedded labels, table is Sheet1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MonthEnd&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Account&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expressions&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({&amp;lt;Date = {"=Floor(Date) = Floor(MonthEnd(Date))"}&amp;gt;}MV)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({&amp;lt;Date = {"=Floor(Date) = Floor(MonthEnd(Date))"}&amp;gt;}Return)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(Sum({&amp;lt;Date = {"=Floor(Date) = Floor(MonthEnd(Date))"}&amp;gt;}MV) &amp;lt;&amp;gt; 0, Avg({&amp;lt;Date&amp;gt;} MV))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(Sum({&amp;lt;Date = {"=Floor(Date) = Floor(MonthEnd(Date))"}&amp;gt;}MV) &amp;lt;&amp;gt; 0, Sum(Return))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(Sum({&amp;lt;Date = {"=Floor(Date) = Floor(MonthEnd(Date))"}&amp;gt;}MV) &amp;lt;&amp;gt; 0, RangeAvg(Above([Monthly Avg. MV], 0, 3)))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2018 13:10:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-calculated-value-within-an-expression/m-p/53899#M771061</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-06-05T13:10:51Z</dc:date>
    </item>
  </channel>
</rss>

