<?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: Getting expression to display all months for only one year in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852448#M1008063</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I can make it work if you have a field that uses both fields, year and month, can be the commented YearMonth field or simply a Date field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise maybe it can be done using if inside the sum, ie:&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Year={$(=max(Year)), $(=max(Year)-1)}, Month, MarketCd={'USA'}&amp;gt;} If(Year=Max(TOTAL Year)-1 or (Year=Max(TOTAL Year) and Month&amp;lt;=Max(TOTAL Month)), Sales))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not tested, maybe doesn't works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 May 2015 12:51:43 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2015-05-13T12:51:43Z</dc:date>
    <item>
      <title>Getting expression to display all months for only one year</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852439#M1008043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Qlik Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm yet again requesting your help. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;I have a line graph with four expressions (Europe, International, USA, Total) and one dimension (YearMonth).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expressions are mostly the same except for the markets that I want in each displayable line. In example:&lt;/P&gt;&lt;P&gt;For USA: &lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Year={$(=max(Year)), $(=max(Year)-1)}, MarketCd={'USA'}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I need is to display all month data for 2014 and be able to choose the months I want for 2015 using list boxes. &lt;/P&gt;&lt;P&gt;I need this is for a report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What happens is: When I select one or more months, QlikView displays ONLY those months for both years. Which makes sense, I just don't know what to put in the expression to make it lock all 12 months for 2014 only. I tried using IF and using AND to combine expressions, but was unsuccessful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried this: Sum({&amp;lt;Year={$(=max(Year)), $(=max(Year)-1)}, Month=, MarketCd={'USA'}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it locks all months for both years instead, ignoring my month selection. Which also makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What can I do? I attached an image. Please ignore the EUR axis, it is merely an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot attach the qvw due to confidentiality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="example.png" class="jive-image image-1" height="238" src="https://community.qlik.com/legacyfs/online/86420_example.png" style="height: 237.661px; width: 785px;" width="785" /&gt;Thank you so much,&lt;/P&gt;&lt;P&gt;Mariana.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 11:32:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852439#M1008043</guid>
      <dc:creator>mfigueiredo</dc:creator>
      <dc:date>2015-05-13T11:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Getting expression to display all months for only one year</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852440#M1008045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;at first glance I would say you need to use the 1 as the default is $ and it forces the current slection. &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({$1 &amp;lt;Year={$(=max(Year)), $(=max(Year)-1)}, MarketCd={'USA'}&amp;gt;}Sales)&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;please try it and let me kow&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 11:39:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852440#M1008045</guid>
      <dc:creator />
      <dc:date>2015-05-13T11:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: Getting expression to display all months for only one year</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852441#M1008047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mariana, you can add a numeric YearMonth field, then you can use this field in set analysis, ie:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;YearMonth={"&amp;gt;=$(=Max(Year)-1 &amp;amp; '01')&amp;lt;=$(=Max(Year) &amp;amp; Num(Max(Month), '00'))}, Year=, Month=, MarketCd={'USA'}&amp;gt;}Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 11:42:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852441#M1008047</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-05-13T11:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Getting expression to display all months for only one year</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852442#M1008049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Imad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For some reason the expressions completely disappear...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your help either way! J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 11:52:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852442#M1008049</guid>
      <dc:creator>mfigueiredo</dc:creator>
      <dc:date>2015-05-13T11:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Getting expression to display all months for only one year</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852443#M1008052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ruben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help. Could you be more specific? How can I add YearMonth field as a numeric field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this involve scripting?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I’m not sure I understand, as I am fairly new to QlikView (less than a month).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 11:56:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852443#M1008052</guid>
      <dc:creator>mfigueiredo</dc:creator>
      <dc:date>2015-05-13T11:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Getting expression to display all months for only one year</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852444#M1008054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mariana, yes it involves scripting in the table where you're loading Year and Month, in example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD Year(Date) as as Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(Date) as Month,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Year(Date) &amp;amp; Num(Month(Date), '00') as YearMonth&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 12:00:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852444#M1008054</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-05-13T12:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Getting expression to display all months for only one year</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852445#M1008056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Mariana,&amp;nbsp; That was my initial suggestion before going any further&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 12:02:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852445#M1008056</guid>
      <dc:creator />
      <dc:date>2015-05-13T12:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: Getting expression to display all months for only one year</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852446#M1008058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ruben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand. The problem is I was told not to script anything since that is the responsibility of the IT department.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I’m only a report/chart developer. I thought I could achieve this via set analysis only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My script table has only my data model loaded and some date/time formats.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could ask the IT to do that. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Meanwhile I hope someone could help me do this via set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 12:06:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852446#M1008058</guid>
      <dc:creator>mfigueiredo</dc:creator>
      <dc:date>2015-05-13T12:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Getting expression to display all months for only one year</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852447#M1008060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I’m just happy you tried to help me. Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 12:06:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852447#M1008060</guid>
      <dc:creator>mfigueiredo</dc:creator>
      <dc:date>2015-05-13T12:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: Getting expression to display all months for only one year</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852448#M1008063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I can make it work if you have a field that uses both fields, year and month, can be the commented YearMonth field or simply a Date field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise maybe it can be done using if inside the sum, ie:&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Year={$(=max(Year)), $(=max(Year)-1)}, Month, MarketCd={'USA'}&amp;gt;} If(Year=Max(TOTAL Year)-1 or (Year=Max(TOTAL Year) and Month&amp;lt;=Max(TOTAL Month)), Sales))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not tested, maybe doesn't works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 12:51:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852448#M1008063</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-05-13T12:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: Getting expression to display all months for only one year</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852449#M1008064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a field with YearMonth together in my model. That is what I’m using as this charts’s dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try your expression also. Thanks so much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 13:14:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852449#M1008064</guid>
      <dc:creator>mfigueiredo</dc:creator>
      <dc:date>2015-05-13T13:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: Getting expression to display all months for only one year</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852450#M1008065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are a genius! Your expression is perfect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you a thousand times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mariana.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 13:22:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852450#M1008065</guid>
      <dc:creator>mfigueiredo</dc:creator>
      <dc:date>2015-05-13T13:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Getting expression to display all months for only one year</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852451#M1008066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nice, try first the set analisys expression, as it's better for performance, it can be simplified a bit:&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;YearMonth={"&amp;gt;=$(=Max(Year)-1 &amp;amp; '01')&amp;lt;=$(=Max(YearMonth))"}, Year=, Month=, MarketCd={'USA'}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change YearMonth using your Dimension field name. I didn't tested so maybe needs debug.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 13:26:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852451#M1008066</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-05-13T13:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Getting expression to display all months for only one year</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852452#M1008067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good, glad to help! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 13:27:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852452#M1008067</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-05-13T13:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Getting expression to display all months for only one year</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852453#M1008068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;well done Rubin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 13:29:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-expression-to-display-all-months-for-only-one-year/m-p/852453#M1008068</guid>
      <dc:creator />
      <dc:date>2015-05-13T13:29:14Z</dc:date>
    </item>
  </channel>
</rss>

