<?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: Expression label based on variable value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-label-based-on-variable-value/m-p/553467#M206794</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Juho, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on the MonthYearID field, you can refernce the Month and Year field and use an expression for label as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;num(Month)&amp;amp;'_'&amp;amp;Year'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and BR,&lt;/P&gt;&lt;P&gt;Abhinava&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Aug 2013 10:22:27 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-08-30T10:22:27Z</dc:date>
    <item>
      <title>Expression label based on variable value</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-label-based-on-variable-value/m-p/553465#M206792</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;I implemented point-in-time -reporting with the same idea Mike describes here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://iqlik.wordpress.com/2010/11/27/the-magic-of-set-analysis-point-in-time-reporting/" title="http://iqlik.wordpress.com/2010/11/27/the-magic-of-set-analysis-point-in-time-reporting/"&gt;The Magic of Set Analysis – Point In Time Reporting | iQlik - Everything QlikView.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My calculations work based on autonumbered field MonthYearID (my version of Mike's PeriodID), with value 1 matching MonthYear 01_2007, value 2 matching MonthYear 02_2007, value 13 matching MonthYear 01_2008 etc.&lt;BR /&gt;I use sets stored in variables to do the calculations, and now I would like to show the used set in the expression label. If Year was 2010 and Month was May, the value for MonthYearID would be 41 and 05_2010 (value of the matching MonthYear-field) should be shown as the expression label.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to use ApplyMap in the label calculation but it did not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone think of an approach that would work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Juho&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Aug 2013 09:26:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-label-based-on-variable-value/m-p/553465#M206792</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-30T09:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Expression label based on variable value</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-label-based-on-variable-value/m-p/553466#M206793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=date(max(MonthYear), 'MMM-YYYY') &amp;amp; chr(10) &amp;amp; '(CM)'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will show you base on max data in database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vikas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Aug 2013 09:54:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-label-based-on-variable-value/m-p/553466#M206793</guid>
      <dc:creator>vikasmahajan</dc:creator>
      <dc:date>2013-08-30T09:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Expression label based on variable value</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-label-based-on-variable-value/m-p/553467#M206794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Juho, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on the MonthYearID field, you can refernce the Month and Year field and use an expression for label as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;num(Month)&amp;amp;'_'&amp;amp;Year'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and BR,&lt;/P&gt;&lt;P&gt;Abhinava&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Aug 2013 10:22:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-label-based-on-variable-value/m-p/553467#M206794</guid>
      <dc:creator />
      <dc:date>2013-08-30T10:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: Expression label based on variable value</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-label-based-on-variable-value/m-p/553468#M206795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Vikas and Abhinava,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perhaps I was a bit unclear with my original post: the below image describes what I try to accomplish.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/46051_Capture.PNG.png" style="max-width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;Selections at the time are May and 2013, so the first expression column shows sales according to the Tuotelaji-dimension for that month (for a specified customer not shown here). The second expression column shows sales for April 2013 and the third for March 2013.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note the 77 in the first expression label; it is the MonthYearID used in the set analysis to calculate the values (725, 1470, 2780 and 0). I got the label by using &lt;EM&gt;=MonthYearID &amp;amp; ' 05_2013'&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I used text 04_2013 and 03_2013 for the other labels, whose MonthYearIDs for set analysis are 76 and 75.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the label should be the MonthYear-form (05_2013) of the variable value (77) used in the expression.&lt;BR /&gt;My variables for the three expressions shown are&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vSetMTD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vSetPreviousMonth&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vSetPreviousNMonth(2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Juho&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Aug 2013 10:58:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-label-based-on-variable-value/m-p/553468#M206795</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-30T10:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Expression label based on variable value</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-label-based-on-variable-value/m-p/553469#M206796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand correctly, you could use a variation on what Abhinava mentioned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=MonthYearId &amp;amp; ' ' &amp;amp; num(Month) &amp;amp; '_' &amp;amp; Year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This -should- give you something like: 77 05_2013 - for your label.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Aug 2013 16:23:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-label-based-on-variable-value/m-p/553469#M206796</guid>
      <dc:creator />
      <dc:date>2013-08-30T16:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Expression label based on variable value</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-label-based-on-variable-value/m-p/553470#M206797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, thats not it - I would basically just like to use a mapping function within the frontend, giving it the MonthYearID used in set analysis and getting the correct MonthYear in return.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;From my picture; variable definition [set analysis] for column labeled '04_2013' is the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13781176615155151" jivemacro_uid="_13781176615155151"&gt;
&lt;P&gt;MonthYearID = {$(=Max(MonthYearID) - 1)},&lt;/P&gt;
&lt;P&gt;Year = ,&lt;/P&gt;
&lt;P&gt;Quarter = ,&lt;/P&gt;
&lt;P&gt;MonthYear = ,&lt;/P&gt;
&lt;P&gt;Month = &lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That definition gives me value 76 for the MonthYearID, so I would like for it to automatically map it to 04_2013 for the label.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 10:39:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-label-based-on-variable-value/m-p/553470#M206797</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-02T10:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: Expression label based on variable value</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-label-based-on-variable-value/m-p/553471#M206798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks everybody, I solved the labeling in the following way (for 4 month-related columns):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First:&lt;/P&gt;&lt;P&gt;=FieldValue('MonthYear',$(=Max(MonthYearID)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second:&lt;/P&gt;&lt;P&gt;=FieldValue('MonthYear',$(=Max(MonthYearID)-1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Third:&lt;/P&gt;&lt;P&gt;=FieldValue('MonthYear',$(=Max(MonthYearID) - 2))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fourth:&lt;/P&gt;&lt;P&gt;=FieldValue('MonthYear',$(=Max(MonthYearID) - 13))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I just take the MonthYearID-part from my variable (which is a number such as 77) and get the matching value of the MonthYear-field from my MasterCalendar-table based on the index number; MonthYearID 1 is 01_2007, 2 is 02_2007 etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Juho&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 12:01:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-label-based-on-variable-value/m-p/553471#M206798</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-02T12:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Expression label based on variable value</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-label-based-on-variable-value/m-p/553472#M206799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a problem with this after. If I want to calculate difference between "Second" and "First" in new expression, it will not allowed me. Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do [Second]-[First] it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but in this occasion you can't use it as you have to put:&lt;/P&gt;&lt;P&gt;[=FieldValue('MonthYear',$(=Max(MonthYearID)))]-[=FieldValue('MonthYear',$(=Max(MonthYearID)-1))]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*they not getting blue [.....]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any resolution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Sep 2013 13:58:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-label-based-on-variable-value/m-p/553472#M206799</guid>
      <dc:creator />
      <dc:date>2013-09-20T13:58:03Z</dc:date>
    </item>
  </channel>
</rss>

