<?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 calculate lastmonth in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/calculate-lastmonth/m-p/396253#M566403</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;I wanna to display the sale value of lastmonth in one chart.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;but my month list are text like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Jan, Feb, Mar……Dec&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;"sum({$&amp;lt;Month={$(=Only(Month)-1)}&amp;gt;} 金额)" will not be available in this situation,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;how can I calculate my lastmonth sales value?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Appreciate for any comment!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 06 Jan 2013 08:32:21 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-01-06T08:32:21Z</dc:date>
    <item>
      <title>calculate lastmonth</title>
      <link>https://community.qlik.com/t5/QlikView/calculate-lastmonth/m-p/396253#M566403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;I wanna to display the sale value of lastmonth in one chart.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;but my month list are text like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Jan, Feb, Mar……Dec&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;"sum({$&amp;lt;Month={$(=Only(Month)-1)}&amp;gt;} 金额)" will not be available in this situation,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;how can I calculate my lastmonth sales value?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Appreciate for any comment!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Jan 2013 08:32:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculate-lastmonth/m-p/396253#M566403</guid>
      <dc:creator />
      <dc:date>2013-01-06T08:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: calculate lastmonth</title>
      <link>https://community.qlik.com/t5/QlikView/calculate-lastmonth/m-p/396254#M566405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your Month field was created with the month() function from a date it will have both a text and a numeric value. So try this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #333333;"&gt;=sum({$&amp;lt;Month = {"&amp;gt;=$(=only(Month)-1)&amp;lt;=$(=only(Month)-1)"}&amp;gt;} &lt;SPAN style="font-family: Arial; background-color: #ffffff;"&gt;金额&lt;/SPAN&gt; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One would think that if the above works then something like Month={"=5"} would work too, but it doesn't. Yet Month={"&amp;gt;=5&amp;lt;=5"} does. I hope QlikTech comes up with a saner way to deal with dual value fields in set analysis expressions soon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your Month only has a text value, then use the dual() function to give it both a text and numeric value or create a numeric field like for example MonthNum too. Better yet, use the &lt;A href="http://code.google.com/p/qlikview-components/"&gt;Qlikview Components&lt;/A&gt; library to generate a calendar for you with all sorts of handy fields and set expressions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Jan 2013 10:56:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculate-lastmonth/m-p/396254#M566405</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-01-06T10:56:29Z</dc:date>
    </item>
  </channel>
</rss>

