<?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: Dynamically Changing MONTH in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dynamically-Changing-MONTH/m-p/1096821#M939052</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you used this quite often respectively in many objects you should consider to create such dimensions within the script, maybe with an &lt;A href="https://community.qlik.com/qlik-blogpost/4531"&gt;The As-Of Table&lt;/A&gt;. If not if might be easier to achieve your wanted sight if you removed this dimension and used for each period an own expression like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Year = {"$(=max(Year)-6)"}&amp;gt;} YourValue)&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Year = {"$(=max(Year)-5)"}&amp;gt;} YourValue)&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Year = {"$(=max(Year)-4)"}&amp;gt;} YourValue)&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Year = {"$(=max(Year)-3)"}&amp;gt;} YourValue)&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Year = {"$(=max(Year)-2)"}&amp;gt;} YourValue)&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Year = {"$(=max(Year)-2)"}, Month = {"&amp;lt;=6"}&amp;gt;} YourValue)&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Jan 2016 08:01:36 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2016-01-29T08:01:36Z</dc:date>
    <item>
      <title>Dynamically Changing MONTH</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamically-Changing-MONTH/m-p/1096819#M939050</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;&lt;/P&gt;&lt;P&gt;The below is the my Data base table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 192px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="52" style="border-bottom-color: lightgray; border-left-color: lightgray;" width="64"&gt;YEAR&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom-color: lightgray; border-left-color: lightgray;" width="64"&gt;QUARTER&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom-color: lightgray; border-left-color: lightgray;" width="64"&gt;MONTH&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none; border-color: lightgray lightgray;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none; border-color: lightgray lightgray;"&gt;2010&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-color: lightgray lightgray;"&gt;Q4&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-color: lightgray lightgray;"&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none; border-color: lightgray lightgray;"&gt;2011&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-color: lightgray lightgray;"&gt;Q4&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-color: lightgray lightgray;"&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none; border-color: lightgray lightgray;"&gt;2012&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-color: lightgray lightgray;"&gt;Q4&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-color: lightgray lightgray;"&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none; border-color: lightgray lightgray;"&gt;2013&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-color: lightgray lightgray;"&gt;Q1&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-color: lightgray lightgray;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none; border-color: lightgray lightgray;"&gt;2013&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-color: lightgray lightgray;"&gt;Q2&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-color: lightgray lightgray;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none; border-color: lightgray lightgray;"&gt;2013&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-color: lightgray lightgray;"&gt;Q4&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-color: lightgray lightgray;"&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none; border-color: lightgray lightgray;"&gt;2014&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-color: lightgray lightgray;"&gt;Q2&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-color: lightgray lightgray;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none; border-color: lightgray lightgray;"&gt;2014&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-color: lightgray lightgray;"&gt;Q2&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-color: lightgray lightgray;"&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none; border-color: lightgray lightgray;"&gt;2014&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-color: lightgray lightgray;"&gt;Q4&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-color: lightgray lightgray;"&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none; border-color: lightgray lightgray;"&gt;2015&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-color: lightgray lightgray;"&gt;Q2&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-color: lightgray lightgray;"&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none; border-color: lightgray lightgray;"&gt;2015&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-color: lightgray lightgray;"&gt;Q4&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-color: lightgray lightgray;"&gt;&lt;P&gt;12&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above table we have YEAR, MONTH and QUARTER&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i want to display my Dimension in my BAR CHART with Dynamically Changing the YEAR like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="112939" alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/112939_Capture.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Presently i have done hard code in my dimension like this "&lt;STRONG&gt;if(MONTH='Jun', 'YTD'&amp;amp; ' ' &amp;amp;MONTH&amp;amp; ' '&amp;nbsp; &amp;amp;YEAR,if(MONTH='Jan' or MONTH='Dec',YEAR))"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This Dimension should Change dynamically&lt;/P&gt;&lt;P&gt;1) If it is latest year it has to be display as 2015 year for december month and "YTD Jun 2015" YEAR(For this it has to pick which is latest month from JAN to NOV only)&lt;/P&gt;&lt;P&gt;2)&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;For Previous year it has to be display as 2014 year for december month and "YTD Jun 2014" YEAR(For this it has to pick which is latest month from JAN to NOV only)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;3) For the all previous to previous YEARS it has to be display as 2013,2012,2011 YEAR(It has to be taken ONLY DECEMBER Month)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Avinash&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/23109" target="_blank"&gt;jagan&lt;/A&gt;‌&amp;nbsp; &lt;A href="https://community.qlik.com/qlik-users/178253" target="_blank"&gt;TamilArasu&lt;/A&gt;‌ &lt;A href="https://community.qlik.com/space/2003" target="_blank"&gt;New to QlikView&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Nov 2020 18:02:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamically-Changing-MONTH/m-p/1096819#M939050</guid>
      <dc:creator />
      <dc:date>2020-11-20T18:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Changing MONTH</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamically-Changing-MONTH/m-p/1096820#M939051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Avinash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can create one variable for month lets say vMonth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then instead of using the Month field, use this variable in your expression :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;"&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;if(vMonth='Jun', 'YTD'&amp;amp; ' ' &amp;amp;&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;vMonth&lt;/STRONG&gt;&amp;amp; ' '&amp;nbsp; &amp;amp;YEAR,if(&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;vMonth&lt;/STRONG&gt;='Jan' or &lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;vMonth&lt;/STRONG&gt;='Dec',YEAR))"&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Hope it helps...!&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Regards,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Mahamed&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2016 07:49:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamically-Changing-MONTH/m-p/1096820#M939051</guid>
      <dc:creator>Mahamed_Qlik</dc:creator>
      <dc:date>2016-01-29T07:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Changing MONTH</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamically-Changing-MONTH/m-p/1096821#M939052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you used this quite often respectively in many objects you should consider to create such dimensions within the script, maybe with an &lt;A href="https://community.qlik.com/qlik-blogpost/4531"&gt;The As-Of Table&lt;/A&gt;. If not if might be easier to achieve your wanted sight if you removed this dimension and used for each period an own expression like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Year = {"$(=max(Year)-6)"}&amp;gt;} YourValue)&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Year = {"$(=max(Year)-5)"}&amp;gt;} YourValue)&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Year = {"$(=max(Year)-4)"}&amp;gt;} YourValue)&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Year = {"$(=max(Year)-3)"}&amp;gt;} YourValue)&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Year = {"$(=max(Year)-2)"}&amp;gt;} YourValue)&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Year = {"$(=max(Year)-2)"}, Month = {"&amp;lt;=6"}&amp;gt;} YourValue)&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2016 08:01:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamically-Changing-MONTH/m-p/1096821#M939052</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-01-29T08:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Changing MONTH</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamically-Changing-MONTH/m-p/1096822#M939053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No its not working&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2016 08:24:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamically-Changing-MONTH/m-p/1096822#M939053</guid>
      <dc:creator />
      <dc:date>2016-01-29T08:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Changing MONTH</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamically-Changing-MONTH/m-p/1096823#M939054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please suggest me for my Hard coded dimesnion only. I want to do in dimension only.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2016 08:26:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamically-Changing-MONTH/m-p/1096823#M939054</guid>
      <dc:creator />
      <dc:date>2016-01-29T08:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Changing MONTH</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamically-Changing-MONTH/m-p/1096824#M939055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anyone Please help me on this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2016 12:33:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamically-Changing-MONTH/m-p/1096824#M939055</guid>
      <dc:creator />
      <dc:date>2016-01-29T12:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Changing MONTH</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamically-Changing-MONTH/m-p/1096825#M939056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's not possible as hardcoded dimension then 2014/2015 and the YTD Jun 2014/2015 are overlapping each other. As alternatively to my above suggested approaches you could use a synthetic dimension with valuelist() - but you will need use these valuelist within the expression, too with an if-loop and all single-expression like above mentioned - which made it not necessary easier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2016 12:49:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamically-Changing-MONTH/m-p/1096825#M939056</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-01-29T12:49:27Z</dc:date>
    </item>
  </channel>
</rss>

