<?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: Need to Get current year and previous month data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-to-Get-current-year-and-previous-month-data/m-p/14606#M2396</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad to know it worked &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Mar 2018 06:49:39 GMT</pubDate>
    <dc:creator>shiveshsingh</dc:creator>
    <dc:date>2018-03-27T06:49:39Z</dc:date>
    <item>
      <title>Need to Get current year and previous month data</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-Get-current-year-and-previous-month-data/m-p/14601#M2391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to see the sales for current year's previous month's data (this works only if i apply filter gauge and then selects the particular month), how to write a correct expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By giving below expression i can get the current years data but when i add months expression it gets failed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Year={'2018'}&amp;gt;}YTD_Sales) --&amp;gt; getting current year sales.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Year={'2018'},Month={Max(Month)-1)}&amp;gt;}YTD_Sales) --&amp;gt; expression gets failed does not return any value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have tried another expression but no result:&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Year={'2018'},Month={Month(AddMonths(Now()),-1)}&amp;gt;}YTD_Sales) --&amp;gt; expression gets failed does not return any value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;MAK.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2018 05:59:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-Get-current-year-and-previous-month-data/m-p/14601#M2391</guid>
      <dc:creator>khanashique</dc:creator>
      <dc:date>2018-03-27T05:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Need to Get current year and previous month data</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-Get-current-year-and-previous-month-data/m-p/14602#M2392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum({&amp;lt;Year={'2018'},Month={"$(=Month(AddMonths(Now(),-1)))"}&amp;gt;}YTD_Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2018 06:11:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-Get-current-year-and-previous-month-data/m-p/14602#M2392</guid>
      <dc:creator>shiveshsingh</dc:creator>
      <dc:date>2018-03-27T06:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need to Get current year and previous month data</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-Get-current-year-and-previous-month-data/m-p/14603#M2393</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;can try this for previous month:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Month(AddMonths(Max(Date),-1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**Date is is your date field you can replace with your actual date field&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2018 06:14:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-Get-current-year-and-previous-month-data/m-p/14603#M2393</guid>
      <dc:creator>vardhancse</dc:creator>
      <dc:date>2018-03-27T06:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need to Get current year and previous month data</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-Get-current-year-and-previous-month-data/m-p/14604#M2394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Shivesh, It worked...&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2018 06:29:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-Get-current-year-and-previous-month-data/m-p/14604#M2394</guid>
      <dc:creator>khanashique</dc:creator>
      <dc:date>2018-03-27T06:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: Need to Get current year and previous month data</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-Get-current-year-and-previous-month-data/m-p/14605#M2395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sasi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply --&amp;gt; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Month(AddMonths(Max(Date),-1)) did not worked...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;The expression which worked is below that is provided by Shivesh&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum({&amp;lt;Year={'2018'},Month={"$(=Month(AddMonths(Now(),-1)))"}&amp;gt;}YTD_Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MAK.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2018 06:33:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-Get-current-year-and-previous-month-data/m-p/14605#M2395</guid>
      <dc:creator>khanashique</dc:creator>
      <dc:date>2018-03-27T06:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need to Get current year and previous month data</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-Get-current-year-and-previous-month-data/m-p/14606#M2396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad to know it worked &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2018 06:49:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-Get-current-year-and-previous-month-data/m-p/14606#M2396</guid>
      <dc:creator>shiveshsingh</dc:creator>
      <dc:date>2018-03-27T06:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Need to Get current year and previous month data</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-Get-current-year-and-previous-month-data/m-p/14607#M2397</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;I meant replace Date with your date field and then this expression will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you place Date column which is there not there in your data mart then it will not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However above expression mentioned correct is correct is correct but it's hard coded, but if we change the month in filter then it may not show the correct value&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2018 08:27:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-Get-current-year-and-previous-month-data/m-p/14607#M2397</guid>
      <dc:creator>vardhancse</dc:creator>
      <dc:date>2018-03-27T08:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need to Get current year and previous month data</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-Get-current-year-and-previous-month-data/m-p/14608#M2398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thanks once again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, i have replaced the Date to my Month Field and it did not worked, yes expression which was provided by Shivesh does not change any value if the month filter is selected...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the purpose of calculation in expressions solved in summary... (so the expression provided by Shivesh works fine.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;MAK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2018 08:33:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-Get-current-year-and-previous-month-data/m-p/14608#M2398</guid>
      <dc:creator>khanashique</dc:creator>
      <dc:date>2018-03-27T08:33:45Z</dc:date>
    </item>
  </channel>
</rss>

