<?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: Label as Expression - can't calculate in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Label-as-Expression-can-t-calculate/m-p/548395#M204867</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, and I wonder if I get you right, you want to calculate the difference between the two expressions in a new (third) expression and you can't reference the previous two because their labels are formulas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that's the problem you can reference the expressions by their coulmn number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For instance, if Sep 13 is the first expression you could do the next formula/expression in the third (new) expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;column(1)-column(2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The disadvantage is that if you enable users to move the columns, this approach will fail&amp;nbsp; whenever the order of the columns is changed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Sep 2013 15:15:54 GMT</pubDate>
    <dc:creator>Carlos_Reyes</dc:creator>
    <dc:date>2013-09-20T15:15:54Z</dc:date>
    <item>
      <title>Label as Expression - can't calculate</title>
      <link>https://community.qlik.com/t5/QlikView/Label-as-Expression-can-t-calculate/m-p/548392#M204864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a problem with Label Expression. If I want to calculate difference between dates in new expression, it will not allowed me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two Labels with expression which shows me current 2013 month and the same month 2012:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sep 2013 Label:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;=Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;YearMonthProper&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,'MMM YY') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sep 2012 Label:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;=date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;addmonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;YearMonthProper&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,-12)),'MMM YY') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do &lt;STRONG&gt;= [Sep 12]-[Sep 13]&lt;/STRONG&gt; 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;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;[Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;YearMonthProper&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,'MMM YY')]-[date&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;addmonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;YearMonthProper&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,-12)),'MMM YY') &lt;/SPAN&gt;]&lt;/SPAN&gt;&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 14:08:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Label-as-Expression-can-t-calculate/m-p/548392#M204864</guid>
      <dc:creator />
      <dc:date>2013-09-20T14:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: Label as Expression - can't calculate</title>
      <link>https://community.qlik.com/t5/QlikView/Label-as-Expression-can-t-calculate/m-p/548393#M204865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IF you want the label to display &lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; [Sep 12]-[Sep 13]&lt;/STRONG&gt; then this should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;='['&amp;amp; Date(YearMonthProper,'MMM YY') &amp;amp;']-['&amp;amp; date(max(addmonths(YearMonthProper,-12)),'MMM YY') &amp;amp;']'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Sep 2013 14:47:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Label-as-Expression-can-t-calculate/m-p/548393#M204865</guid>
      <dc:creator>adamwilson</dc:creator>
      <dc:date>2013-09-20T14:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: Label as Expression - can't calculate</title>
      <link>https://community.qlik.com/t5/QlikView/Label-as-Expression-can-t-calculate/m-p/548394#M204866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I'm sorry, maybe I wasn't clear enough. I have a pivot table. I want compare Sales 12 with sales 13 against each month. So for example Sep 2012 against Sep 2013. I don't want to change labels in the next month so I added expressions in labels. Everything looks like that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sales September 2013:&lt;/P&gt;&lt;P&gt;Label: &lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;=Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;YearMonthProper&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,'MMM YY') &lt;/SPAN&gt; which displays "&lt;STRONG&gt;Sep 13&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;Definition:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(=max(Year))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;lt;=$(=max({&amp;lt;Year={$(=max(Year))}&amp;gt;}Month))&amp;gt;$(=max({&amp;lt;Year={$(=max(Year))}&amp;gt;}Month)-1)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Invoice Order Tag]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'Invoiced'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Net sales value]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sales September 2012:&lt;/P&gt;&lt;P&gt;Label: &lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;=date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;addmonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;YearMonthProper&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,-12)),'MMM YY')&amp;nbsp; which displays "&lt;STRONG&gt;Sep 12&lt;/STRONG&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Definition: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={*},Month={*},YearMonthProper={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"$(=date(max(addmonths(YearMonthProper,-12)),'dd/MMM/YYYY'))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Invoice Order Tag]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'Invoiced'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Net sales value]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Sep 12 and Sep 13 display on the pivot table but the fields name in the expression are full expressions. I can't calculate difference in sales between those two dates as just doesn't work like I said before.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Any ideas?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Sep 2013 15:04:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Label-as-Expression-can-t-calculate/m-p/548394#M204866</guid>
      <dc:creator />
      <dc:date>2013-09-20T15:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: Label as Expression - can't calculate</title>
      <link>https://community.qlik.com/t5/QlikView/Label-as-Expression-can-t-calculate/m-p/548395#M204867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, and I wonder if I get you right, you want to calculate the difference between the two expressions in a new (third) expression and you can't reference the previous two because their labels are formulas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that's the problem you can reference the expressions by their coulmn number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For instance, if Sep 13 is the first expression you could do the next formula/expression in the third (new) expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;column(1)-column(2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The disadvantage is that if you enable users to move the columns, this approach will fail&amp;nbsp; whenever the order of the columns is changed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Sep 2013 15:15:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Label-as-Expression-can-t-calculate/m-p/548395#M204867</guid>
      <dc:creator>Carlos_Reyes</dc:creator>
      <dc:date>2013-09-20T15:15:54Z</dc:date>
    </item>
  </channel>
</rss>

