<?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: Limit a dimension to only show the last X months to date? in Visualization and Usability</title>
    <link>https://community.qlik.com/t5/Visualization-and-Usability/Limit-a-dimension-to-only-show-the-last-X-months-to-date/m-p/889662#M43067</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny! &lt;SPAN style="mso-bidi-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA; line-height: 107%; color: #000000; font-size: 11pt; mso-ansi-language: EN-GB; mso-hansi-theme-font: minor-latin; font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-bidi-theme-font: minor-bidi;"&gt;Many thanks for taking time to help community. I wish I’ll be able one day to help as well…&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, I don't understand your expression and how to use it.&lt;/P&gt;&lt;P&gt;First, I didn't use the Monthname() function. I used dual(Year(TempDate) &amp;amp; Month(TempDate), Year(TempDate) &amp;amp; num(Month(TempDate))) as YearMonth with Dual() function in order to sort Month by numeric value. Maybe it could be done smarter...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, I'm not sure where I should use this expression... Should I use it in the limitation area of the YearMonth dimension ?&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;&lt;SPAN style="font-family: Calibri;"&gt; See screenshot below (sorry, French language… &lt;/SPAN&gt;J&lt;SPAN style="font-family: Calibri;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 8pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;And I don’t understand how this expression will tell to the graph what is the “end date” part and what is the “start date” part?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 8pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;In the end, as you can see in the screenshot, using your expression in the limitation area of the dimension as given me only one bar for October 2015.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 8pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;I’m clearly missing some things…&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 8pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;If you can take few more minutes to drive me through or indicate me some readings.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN lang="EN-GB" style="line-height: 107%; font-family: 'Calibri',sans-serif; font-size: 11pt; mso-ansi-language: EN-GB; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN lang="EN-GB" style="line-height: 107%; font-family: 'Calibri',sans-serif; font-size: 11pt; mso-ansi-language: EN-GB; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;Patrick&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN lang="EN-GB" style="line-height: 107%; font-family: 'Calibri',sans-serif; font-size: 11pt; mso-ansi-language: EN-GB; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/88091_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN lang="EN-GB" style="line-height: 107%; font-family: 'Calibri',sans-serif; font-size: 11pt; mso-ansi-language: EN-GB; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Jun 2015 16:56:33 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-06-01T16:56:33Z</dc:date>
    <item>
      <title>Limit a dimension to only show the last X months to date?</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/Limit-a-dimension-to-only-show-the-last-X-months-to-date/m-p/889660#M43065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 8pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Hi all,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 8pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;I have a bar graph that is showing actual sales compared to Budgeted sales.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 8pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;I want the graph to only show the last X months to date. By this I mean in June 2015, I want to see the last 12 months up to June 2015, which is June 2014 to June 2015, even if my budget data is going up to December 2015.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 8pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;I have a master calendar in which I have Year, Month and YearMonth fields I can use.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 8pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;My bar graph is using YearMonth Dimension.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 8pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;I thought I should use Dimension limitation by fixed number and set an expression like this : Y&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;earMonth={"&amp;gt;$(=Max(YearMonth)-12) &amp;lt;=$(=Max(YearMonth))"}&amp;gt;}, but it didn’t work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 8pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;I digged around on post about last x months but they are mostly for QlikView while I’m using Qlik Sense.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 8pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Thanks in advance for your help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; Patrick&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 14:50:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/Limit-a-dimension-to-only-show-the-last-X-months-to-date/m-p/889660#M43065</guid>
      <dc:creator />
      <dc:date>2015-06-01T14:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Limit a dimension to only show the last X months to date?</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/Limit-a-dimension-to-only-show-the-last-X-months-to-date/m-p/889661#M43066</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="font-size: 12pt; font-family: Calibri; color: #000000;"&gt;Y&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Calibri; color: #000000;"&gt;earMonth={"&amp;gt;$(=&lt;STRONG&gt;MonthName&lt;/STRONG&gt;(AddYears(Max(YearMonth), -1)), &amp;lt;= $(=&lt;STRONG&gt;MonthName&lt;/STRONG&gt;(Max(YearMonth)))"}&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Calibri; color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Calibri; color: #000000;"&gt;here I am assuming thet YearMonth is having formated in the script using MonthName() function. If it is not, you will need to make sure that expression within the curly brackets have the same format as YearMonth.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Calibri; color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Calibri; color: #000000;"&gt;HTH&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Calibri; color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Calibri; color: #000000;"&gt;Best,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Calibri; color: #000000;"&gt;Sunny&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 14:55:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/Limit-a-dimension-to-only-show-the-last-X-months-to-date/m-p/889661#M43066</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-06-01T14:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Limit a dimension to only show the last X months to date?</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/Limit-a-dimension-to-only-show-the-last-X-months-to-date/m-p/889662#M43067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny! &lt;SPAN style="mso-bidi-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA; line-height: 107%; color: #000000; font-size: 11pt; mso-ansi-language: EN-GB; mso-hansi-theme-font: minor-latin; font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-bidi-theme-font: minor-bidi;"&gt;Many thanks for taking time to help community. I wish I’ll be able one day to help as well…&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, I don't understand your expression and how to use it.&lt;/P&gt;&lt;P&gt;First, I didn't use the Monthname() function. I used dual(Year(TempDate) &amp;amp; Month(TempDate), Year(TempDate) &amp;amp; num(Month(TempDate))) as YearMonth with Dual() function in order to sort Month by numeric value. Maybe it could be done smarter...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, I'm not sure where I should use this expression... Should I use it in the limitation area of the YearMonth dimension ?&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;&lt;SPAN style="font-family: Calibri;"&gt; See screenshot below (sorry, French language… &lt;/SPAN&gt;J&lt;SPAN style="font-family: Calibri;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 8pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;And I don’t understand how this expression will tell to the graph what is the “end date” part and what is the “start date” part?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 8pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;In the end, as you can see in the screenshot, using your expression in the limitation area of the dimension as given me only one bar for October 2015.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 8pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;I’m clearly missing some things…&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 8pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;If you can take few more minutes to drive me through or indicate me some readings.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN lang="EN-GB" style="line-height: 107%; font-family: 'Calibri',sans-serif; font-size: 11pt; mso-ansi-language: EN-GB; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN lang="EN-GB" style="line-height: 107%; font-family: 'Calibri',sans-serif; font-size: 11pt; mso-ansi-language: EN-GB; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;Patrick&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN lang="EN-GB" style="line-height: 107%; font-family: 'Calibri',sans-serif; font-size: 11pt; mso-ansi-language: EN-GB; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/88091_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN lang="EN-GB" style="line-height: 107%; font-family: 'Calibri',sans-serif; font-size: 11pt; mso-ansi-language: EN-GB; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 16:56:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/Limit-a-dimension-to-only-show-the-last-X-months-to-date/m-p/889662#M43067</guid>
      <dc:creator />
      <dc:date>2015-06-01T16:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Limit a dimension to only show the last X months to date?</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/Limit-a-dimension-to-only-show-the-last-X-months-to-date/m-p/889663#M43068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I finally found a solution to my problem. Maybe not the most elegant one, but at least it did work. And for newbie like me, it might save quite some time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As reminder, I wanted to restrict the bar graph to the last X months of actual sales and restrict the Budgeted sales to not display budget for month greater than current month. Nothing exotic I would say.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought initially that I should use a limitation in the Dimension I used (YearMonth). But this doesn't allow to do what I wanted.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;After digging around and a lot of try, I found that I had to use the Measures of my bar graph. Maybe that sounds obvious but it wasn't for me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, here are the expressions I used:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;To limit actual sales to 12 months : Sum({$&amp;lt;InvoiceDate = {"&amp;gt;=$(=date(today()-365))"}&amp;gt;}[Invoice Amount])&lt;/LI&gt;&lt;LI&gt;To limit budgeted sales to 12 months and to not show data greater than today: sum({$&amp;lt;BudgetDate = {"&amp;gt;=$(=date(today()-370)) &amp;lt;=$(=today())"}&amp;gt;}MontantBudget)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Here is the result:&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/88309_pastedImage_3.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;I'm sure there are smarter ways to achieve this, and will try on my own.&lt;/P&gt;&lt;P&gt;Hope this will help someone.&lt;/P&gt;&lt;P&gt;Best&lt;BR /&gt;Patrick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2015 15:34:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/Limit-a-dimension-to-only-show-the-last-X-months-to-date/m-p/889663#M43068</guid>
      <dc:creator />
      <dc:date>2015-06-03T15:34:14Z</dc:date>
    </item>
  </channel>
</rss>

