<?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 Construct an expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Construct-an-expression/m-p/1285032#M872499</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two buttons:&lt;/P&gt;&lt;P&gt;btnA - set expression to period jan-2016 to mar-2016&lt;/P&gt;&lt;P&gt;btnB - set expression to period apr-2015 to jun-2015&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I have a variable vExpr:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;- When btnA, vExpr gets the value &lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt;"&gt;'MonthYear ={"&amp;gt;=$(=Date(AddMonths(Min(MonthYear),-$(vMonthDiff)), 'MMM-YYYY'))&amp;lt;=$(=Date(AddMonths(Max(MonthYear),-$(vMonthDiff)), 'MMM-YYYY'))"}'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- When btnB, vExpr gets the value&lt;STRONG&gt; 'MonthYear ={"&amp;gt;=$(=Date(min(addmonths(MonthYear,-12)),'MMM-YYYY'))&amp;lt;=$(=Date(max(addmonths(MonthYear,-12)),'MMM-YYYY'))"}'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I have an expression, in a text object with the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;='=Money(SUM ({&amp;lt;' &amp;amp; $(vExpr) &amp;amp; ', AC_METRICA = {"Vendas Sem Iva"}&amp;gt;}[AC_VALOR_REAL]),vFormatNumber)'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm getting the next result in the text object:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Money(SUM ({&amp;lt;MonthYear ={"&amp;gt;=jan-2016&amp;lt;=mar-2016"}, AC_METRICA = {"Vendas Sem Iva"}&amp;gt;}[AC_VALOR_REAL]),vFormatNumber)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="example21112016.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/144410_example21112016.png" style="height: 196px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When what I really want is the value of the expression above, that should be "90 013 728 €", just for an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think my problem is in the equal signs but I'm not getting there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Sílvia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Construct an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Construct-an-expression/m-p/1285032#M872499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two buttons:&lt;/P&gt;&lt;P&gt;btnA - set expression to period jan-2016 to mar-2016&lt;/P&gt;&lt;P&gt;btnB - set expression to period apr-2015 to jun-2015&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I have a variable vExpr:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;- When btnA, vExpr gets the value &lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt;"&gt;'MonthYear ={"&amp;gt;=$(=Date(AddMonths(Min(MonthYear),-$(vMonthDiff)), 'MMM-YYYY'))&amp;lt;=$(=Date(AddMonths(Max(MonthYear),-$(vMonthDiff)), 'MMM-YYYY'))"}'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- When btnB, vExpr gets the value&lt;STRONG&gt; 'MonthYear ={"&amp;gt;=$(=Date(min(addmonths(MonthYear,-12)),'MMM-YYYY'))&amp;lt;=$(=Date(max(addmonths(MonthYear,-12)),'MMM-YYYY'))"}'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I have an expression, in a text object with the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;='=Money(SUM ({&amp;lt;' &amp;amp; $(vExpr) &amp;amp; ', AC_METRICA = {"Vendas Sem Iva"}&amp;gt;}[AC_VALOR_REAL]),vFormatNumber)'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm getting the next result in the text object:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Money(SUM ({&amp;lt;MonthYear ={"&amp;gt;=jan-2016&amp;lt;=mar-2016"}, AC_METRICA = {"Vendas Sem Iva"}&amp;gt;}[AC_VALOR_REAL]),vFormatNumber)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="example21112016.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/144410_example21112016.png" style="height: 196px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When what I really want is the value of the expression above, that should be "90 013 728 €", just for an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think my problem is in the equal signs but I'm not getting there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Sílvia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Construct-an-expression/m-p/1285032#M872499</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Construct an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Construct-an-expression/m-p/1285033#M872500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be add a dollar sign expansion&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;$(&lt;/STRONG&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;='=Money(SUM ({&amp;lt;' &amp;amp; $(vExpr) &amp;amp; ', AC_METRICA = {"Vendas Sem Iva"}&amp;gt;}[AC_VALOR_REAL]),vFormatNumber)'&lt;SPAN style="color: #ff0000;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2016 14:28:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Construct-an-expression/m-p/1285033#M872500</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-11-21T14:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Construct an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Construct-an-expression/m-p/1285034#M872502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Silvia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I always hit these sorts of problems and it always takes some fiddling to sort out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;='Money(SUM ({&amp;lt;' &amp;amp; $(vExpr) &amp;amp; ', AC_METRICA = {"Vendas Sem Iva"}&amp;gt;}[AC_VALOR_REAL]),vFormatNumber)'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not work for you? If not then try&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;$(&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;='Money(SUM ({&amp;lt;' &amp;amp; $(vExpr) &amp;amp; ', AC_METRICA = {"Vendas Sem Iva"}&amp;gt;}[AC_VALOR_REAL]),vFormatNumber)')&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2016 14:29:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Construct-an-expression/m-p/1285034#M872502</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2016-11-21T14:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Construct an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Construct-an-expression/m-p/1285035#M872503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help, it worked &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #ff0000;"&gt;= $(&lt;/STRONG&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;='=Money(SUM ({&amp;lt;' &amp;amp; $(vExpr) &amp;amp; ', AC_METRICA = {"Vendas Sem Iva"}&amp;gt;}[AC_VALOR_REAL]),vFormatNumber)'&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2016 14:31:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Construct-an-expression/m-p/1285035#M872503</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-21T14:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: Construct an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Construct-an-expression/m-p/1285036#M872504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your answer works as well, as long as I put another "=", like in the reply I gave to Sunny.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks too &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2016 14:34:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Construct-an-expression/m-p/1285036#M872504</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-21T14:34:07Z</dc:date>
    </item>
  </channel>
</rss>

