<?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: Problem with expressions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-expressions/m-p/947390#M949268</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To be honest i think that the problem comes from the way i ve been translating my formula from Excel to Qlikview as the data seems to be working well while using the first variables i gave.&lt;/P&gt;&lt;P&gt;The only thing that goes wrong is, to me, while calculating the expressions of "crecen,decrecen,nuevos,perdidos"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Dec 2015 09:27:14 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-12-18T09:27:14Z</dc:date>
    <item>
      <title>Problem with expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expressions/m-p/947387#M949265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone , &lt;/P&gt;&lt;P&gt;I post this as i'm encountering kind of a problem with an expression In qlikview.&lt;/P&gt;&lt;P&gt;I ve been searching in the other posts but havn't seen an answer to my problem at the moment.&lt;/P&gt;&lt;P&gt;So let me show you: I have this table in Excel that i'd like to get in Qlikview to do a waterfall&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/servlet/JiveServlet/showImage/2-936116-109267/1.png"&gt;&lt;IMG alt="1.png" class="jive-image image-1" height="900" src="https://community.qlik.com/legacyfs/online/109279_1.png" width="1125" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Actually, i know how to do a waterfall but i need some help translating formulas for "crecen" which is " Increasing", for "decrecen" that is " decreasing"," nuevos" for "new one" and "perdidos" for " those that were lost"&lt;/P&gt;&lt;P&gt;In my script, i have this as fixed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="ES" style="color: #1f497d; background: yellow;"&gt;VARIABLES&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="ES" style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: gray;"&gt;vPeriodo &lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="ES" style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: gray;"&gt;$(=Max(PeriodoID)&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="ES" style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: gray;"&gt;vMesAnterior&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="ES" style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: maroon;"&gt;PeriodoID&lt;/SPAN&gt;&lt;SPAN lang="ES" style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;={&lt;/SPAN&gt;&lt;SPAN lang="ES" style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: maroon;"&gt;"$(=Max(PeriodoID)-12)"&lt;/SPAN&gt;&lt;SPAN lang="ES" style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;} &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;In excel, i have for:&lt;/P&gt;&lt;P&gt;- "crecen" =IF(E2&amp;gt;0;E2;"") that i translated with "IF(Sum({&amp;lt;vPeriodo&amp;gt;}IMPORTE)-sum({$&amp;lt;$(vMesAnterior)&amp;gt;}IMPORTE) &amp;gt;&amp;gt;0,Sum({&amp;lt;vPeriodo&amp;gt;}IMPORTE)-sum({$&amp;lt;$(vMesAnterior)&amp;gt;}IMPORTE) )"&lt;/P&gt;&lt;P&gt;- "decrecen" =IF(E7&amp;lt;0;E7;"") that i translated with "IF(Sum({&amp;lt;vPeriodo&amp;gt;}IMPORTE)-sum({$&amp;lt;$(vMesAnterior)&amp;gt;}IMPORTE) &amp;lt;&amp;lt;0,Sum({&amp;lt;vPeriodo&amp;gt;}IMPORTE)-sum({$&amp;lt;$(vMesAnterior)&amp;gt;}IMPORTE) )"&lt;/P&gt;&lt;P&gt;- "perdidos" =IF(C2=0;E2;"") that i translated with "IF(Alt(Sum({&amp;lt;vPeriodo&amp;gt;}IMPORTE), 0),Sum({&amp;lt;vPeriodo&amp;gt;}IMPORTE)-sum({$&amp;lt;$(vMesAnterior)&amp;gt;}IMPORTE))"&lt;/P&gt;&lt;P&gt;- " nuevos" =IF(D16=0;SI(E16&amp;gt;0;E16;"");"") that i translated with "if(Alt(Sum({$&amp;lt;$(vMesAnterior)&amp;gt;}IMPORTE), 0),IF(Sum({&amp;lt;vPeriodo&amp;gt;}IMPORTE)-sum({$&amp;lt;$(vMesAnterior)&amp;gt;}IMPORTE) &amp;gt;&amp;gt;0,Sum({&amp;lt;vPeriodo&amp;gt;}IMPORTE)-sum({$&amp;lt;$(vMesAnterior)&amp;gt;}IMPORTE) ))"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a copy of what i get in qlikview using these formulas &lt;A _jive_internal="true" href="https://community.qlik.com/servlet/JiveServlet/showImage/2-936126-109272/2.png"&gt;&lt;IMG alt="2.png" class="jive-image image-1" height="900" src="https://community.qlik.com/legacyfs/online/109283_2.png" width="1125" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;See that i get the same number for both Crecen/Decrecen/Perdidos/Nuevos which is, to my mind, not that easy to understand&lt;/P&gt;&lt;P&gt;Have i made a mystake?&lt;/P&gt;&lt;P&gt;Thank you for your attention,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arno Cacciaguerra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2015 11:42:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expressions/m-p/947387#M949265</guid>
      <dc:creator />
      <dc:date>2015-12-17T11:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expressions/m-p/947388#M949266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At first glance there are several issues:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) &amp;gt;&amp;gt; and &amp;lt;&amp;lt; are bit shift operator, not comparison operator. Use &amp;gt; resp. &amp;lt; instead.&lt;/P&gt;&lt;P&gt;2) &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;{&amp;lt;vPeriodo&amp;gt;} seems not to evaluate to a valid set expression. &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;It think you would need to use&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&amp;lt;$(vPeriodo)&amp;gt;}, with a variable definition like&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="ES" style="font-size: 9pt; font-family: Arial, sans-serif; color: maroon;"&gt;PeriodoID&lt;/SPAN&gt;&lt;SPAN lang="ES" style="font-size: 9pt; font-family: Arial, sans-serif; color: black;"&gt;={&lt;/SPAN&gt;&lt;SPAN lang="ES" style="font-size: 9pt; font-family: Arial, sans-serif; color: maroon;"&gt;"$(=Max(PeriodoID))"&lt;/SPAN&gt;&lt;SPAN lang="ES" style="font-size: 9pt; font-family: Arial, sans-serif; color: black;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2015 14:00:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expressions/m-p/947388#M949266</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-12-17T14:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expressions/m-p/947389#M949267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tried to change &amp;gt;&amp;gt; and &amp;lt;&amp;lt; first but this has no effect&lt;/P&gt;&lt;P&gt;Then i added this definition of the variable you gave me but here it went kinda wrong( changed it, in the expression, too)&lt;/P&gt;&lt;P&gt;Here is what happened &lt;IMG alt="3.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/109410_3.png" style="height: 496px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Dec 2015 09:07:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expressions/m-p/947389#M949267</guid>
      <dc:creator />
      <dc:date>2015-12-18T09:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expressions/m-p/947390#M949268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To be honest i think that the problem comes from the way i ve been translating my formula from Excel to Qlikview as the data seems to be working well while using the first variables i gave.&lt;/P&gt;&lt;P&gt;The only thing that goes wrong is, to me, while calculating the expressions of "crecen,decrecen,nuevos,perdidos"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Dec 2015 09:27:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expressions/m-p/947390#M949268</guid>
      <dc:creator />
      <dc:date>2015-12-18T09:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expressions/m-p/947391#M949269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you upload your QVW, with some sample data (could be mock up data)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Dec 2015 10:57:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expressions/m-p/947391#M949269</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-12-18T10:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expressions/m-p/947392#M949270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is what i m working with&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arno Cacciaguerra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Dec 2015 11:37:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expressions/m-p/947392#M949270</guid>
      <dc:creator />
      <dc:date>2015-12-18T11:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expressions/m-p/947393#M949271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There was still a bit shift operator at one place and the variable name was not correctly defined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also added an virtual table using aggr() function to do the calculations per PARENT_ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is how far I got, maybe this could be a starting point for you to apply your requirements.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Dec 2015 01:17:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expressions/m-p/947393#M949271</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-12-19T01:17:13Z</dc:date>
    </item>
  </channel>
</rss>

