<?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: valueloop in chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/valueloop-in-chart/m-p/386071#M144191</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry, i didn't work ... i have to create the same for year, month and qtr ... for month ... i have to use monthkey ( which is basically starts from 36 and goes back to 1) , when i select month 24 i need a chart for months 24 to 13 as dimension and sum of sales as expression. tried the metiod u mentioned didn't work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Feb 2013 20:43:08 GMT</pubDate>
    <dc:creator>sr_qlikview</dc:creator>
    <dc:date>2013-02-27T20:43:08Z</dc:date>
    <item>
      <title>valueloop in chart</title>
      <link>https://community.qlik.com/t5/QlikView/valueloop-in-chart/m-p/386065#M144185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello all &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am using value loop on the dimension to get years (vMaxyr = 2012, vPrYr = 2010) , want to get sum of sales, how do we defnie expression for the corresponding year from valueloop?? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 20:49:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/valueloop-in-chart/m-p/386065#M144185</guid>
      <dc:creator>sr_qlikview</dc:creator>
      <dc:date>2013-02-26T20:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: valueloop in chart</title>
      <link>https://community.qlik.com/t5/QlikView/valueloop-in-chart/m-p/386066#M144186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are using you using something &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=valueloop( 2010, 2012, 1) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as dimension,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the exact same will return the current dimension value when used in an expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(valueloop( 2010, 2012, 1) = 2011, 'year in the middle', 'either start or end year')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 21:43:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/valueloop-in-chart/m-p/386066#M144186</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-02-26T21:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: valueloop in chart</title>
      <link>https://community.qlik.com/t5/QlikView/valueloop-in-chart/m-p/386067#M144187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if i use the valueloop(2010,2012,1) (actually my years in variables, but still tried with hardcoded yrs), expression sum(sales) gives the same value (sum of all 3yrs) for all 3 years, and chart dimension listed 2010,2011,2012 &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 21:58:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/valueloop-in-chart/m-p/386067#M144187</guid>
      <dc:creator>sr_qlikview</dc:creator>
      <dc:date>2013-02-26T21:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: valueloop in chart</title>
      <link>https://community.qlik.com/t5/QlikView/valueloop-in-chart/m-p/386068#M144188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, the synthetic dimension you are creating with valueloop() is not connected to your data model, so you are getting the same value back for all dimension values if you are using something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The correct approach in QV would be to use a date field from your data model to group your data, a year field as dimension or a calculated dimension using year(date) function on a date field. Then you would automatically get the sales per year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems like I don't get what you want to achieve, could you post some sample lines of data and your requested outcome?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 22:38:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/valueloop-in-chart/m-p/386068#M144188</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-02-26T22:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: valueloop in chart</title>
      <link>https://community.qlik.com/t5/QlikView/valueloop-in-chart/m-p/386069#M144189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;vMaxyr = Max(year)&lt;/P&gt;&lt;P&gt;vLastyr = Max(year)-2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dimension defined:&lt;/P&gt;&lt;P&gt;=valueloop($(vMaxyr),$(vLastyr),1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;expression: &lt;/P&gt;&lt;P&gt;sum(sales) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anything wrong in syntax ? should i use any specific syntax in expression ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;requirement: when i select any year (ex: 2010) i wanted to get sales for past 3 yrs (2010,2009,2008) on a line chart. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 23:08:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/valueloop-in-chart/m-p/386069#M144189</guid>
      <dc:creator>sr_qlikview</dc:creator>
      <dc:date>2013-02-26T23:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: valueloop in chart</title>
      <link>https://community.qlik.com/t5/QlikView/valueloop-in-chart/m-p/386070#M144190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just wouldn't use a synthetic dimension for that kind of requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try your year field as dimension and your sum with a set expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;year = {"&amp;gt;=$(vLastyr)&amp;lt;=$(vMaxyr)"}&amp;gt;} sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 23:14:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/valueloop-in-chart/m-p/386070#M144190</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-02-26T23:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: valueloop in chart</title>
      <link>https://community.qlik.com/t5/QlikView/valueloop-in-chart/m-p/386071#M144191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry, i didn't work ... i have to create the same for year, month and qtr ... for month ... i have to use monthkey ( which is basically starts from 36 and goes back to 1) , when i select month 24 i need a chart for months 24 to 13 as dimension and sum of sales as expression. tried the metiod u mentioned didn't work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 20:43:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/valueloop-in-chart/m-p/386071#M144191</guid>
      <dc:creator>sr_qlikview</dc:creator>
      <dc:date>2013-02-27T20:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: valueloop in chart</title>
      <link>https://community.qlik.com/t5/QlikView/valueloop-in-chart/m-p/386072#M144192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please post a small sample application (or an Excel table with sample input data), it's much easier to see then what your are talking about. &lt;/P&gt;&lt;P&gt;Please also post a small description what you want to see (e.g. using an Excel table).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 21:22:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/valueloop-in-chart/m-p/386072#M144192</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-02-27T21:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: valueloop in chart</title>
      <link>https://community.qlik.com/t5/QlikView/valueloop-in-chart/m-p/386073#M144193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for your help, it worked with adding 1 as set selection. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 21:39:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/valueloop-in-chart/m-p/386073#M144193</guid>
      <dc:creator>sr_qlikview</dc:creator>
      <dc:date>2013-02-28T21:39:36Z</dc:date>
    </item>
  </channel>
</rss>

