<?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: Garbage after expression in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Garbage-after-expression/m-p/1458808#M35997</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share a screenshot of the error message and the expression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Jan 2018 12:23:46 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-01-04T12:23:46Z</dc:date>
    <item>
      <title>Garbage after expression</title>
      <link>https://community.qlik.com/t5/App-Development/Garbage-after-expression/m-p/1458807#M35996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear community, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am developing a Qlik Sense App and struggle with the following KPI formula: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=IF(-(SUM(Target_rev * year_flag)-SUM(Erloese_Netto*year_flag))/Sum(Target_rev) = 0, '' , -(SUM(Target_rev * year_flag)-SUM(Erloese_Netto*year_flag))/Sum(Target_rev) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error message is: &lt;/P&gt;&lt;P&gt;Garbage after expression '&lt;SPAN style="font-size: 13.3333px;"&gt;=IF(-(SUM(Target_rev * year_flag)-SUM(Erloese_Netto*year_flag))/Sum(Target_rev) = 0, '' , -(SUM(Target_rev * year_flag)-SUM(Erloese_Netto*year_flag))/Sum(Target_rev) )'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Can you help me finding the error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gregor &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2018 10:01:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Garbage-after-expression/m-p/1458807#M35996</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-04T10:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Garbage after expression</title>
      <link>https://community.qlik.com/t5/App-Development/Garbage-after-expression/m-p/1458808#M35997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share a screenshot of the error message and the expression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2018 12:23:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Garbage-after-expression/m-p/1458808#M35997</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-01-04T12:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Garbage after expression</title>
      <link>https://community.qlik.com/t5/App-Development/Garbage-after-expression/m-p/1458809#M35998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I replicated those fields and created a KPI object with that formula and worked perfectly. Can it be field types? Are all of those fields or are you bringing variables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just saw Sunny's replies, so you're in good hands,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Luis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2018 12:36:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Garbage-after-expression/m-p/1458809#M35998</guid>
      <dc:creator>luismadriz</dc:creator>
      <dc:date>2018-01-04T12:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: Garbage after expression</title>
      <link>https://community.qlik.com/t5/App-Development/Garbage-after-expression/m-p/1458810#M35999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Sunny and Luis, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first of all thanks for your requests. &lt;/P&gt;&lt;P&gt;For some reason, without having changed anything, the garbage error disappeard. Nevertheless, the KPI shows no result at all. &lt;/P&gt;&lt;P&gt;Attached you will find a screenshot for the KPI formular and a screenshot for the manually calculated variable year_flag. All other variables in the formular are just input data that is without an error because e.g. another KPI using the same input data is working properly: &lt;/P&gt;&lt;P&gt;=-(SUM({1}Target_rev)-SUM({1}Erloese_Netto))/Sum({1}Target_rev)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you solve this issue? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;Gregor &lt;IMG alt="Unbenannt.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/188923_Unbenannt.PNG" style="height: 313px; width: 620px;" /&gt;&lt;IMG alt="Unbenannt2.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/188927_Unbenannt2.PNG" style="height: 580px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2018 12:48:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Garbage-after-expression/m-p/1458810#M35999</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-04T12:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Garbage after expression</title>
      <link>https://community.qlik.com/t5/App-Development/Garbage-after-expression/m-p/1458811#M36000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to check if this is working or not&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;&lt;STRONG&gt;-(Sum(Target_rev * year_flag)-Sum(Erloese_Netto*year_flag))/Sum(Target_rev)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is working, then we know that the issue is somewhere in the if statement... if not, then we can focus on fixing the above expression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2018 12:54:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Garbage-after-expression/m-p/1458811#M36000</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-01-04T12:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Garbage after expression</title>
      <link>https://community.qlik.com/t5/App-Development/Garbage-after-expression/m-p/1458812#M36001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your provided formula doesn't work. It simply displays 0,00%. &lt;/P&gt;&lt;P&gt;The goal should actually be that if I filter for a month, the KPI should show me the percentage deviation. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2018 13:43:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Garbage-after-expression/m-p/1458812#M36001</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-04T13:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: Garbage after expression</title>
      <link>https://community.qlik.com/t5/App-Development/Garbage-after-expression/m-p/1458813#M36002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Your provided formula doesn't work.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;My provided formula? Hahahaha, I just asked you to test this expression for me... and this is just the false part of the if condition.... so, I guess we know that the problem is in the above expression&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: #3d3d3d;"&gt;-(Sum(Target_rev * year_flag)-Sum(Erloese_Netto*year_flag))/Sum(Target_rev)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you further break it down into three expressions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum(Target_rev * year_flag)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2) &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum(Erloese_Netto*year_flag)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;3) &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum(Target_rev)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am guessing that the third expression will not have any issues... It appears to be an issue with multiplication with year_flag variable....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Out of curiosity, what happens if you remove the = sign from your variable definition and then try it these two ways&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(Target_rev * year_flag)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(Target_rev * $(year_flag))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does one of these two work for you?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2018 13:48:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Garbage-after-expression/m-p/1458813#M36002</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-01-04T13:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: Garbage after expression</title>
      <link>https://community.qlik.com/t5/App-Development/Garbage-after-expression/m-p/1458814#M36003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Based on your support I could find the error, thank you very much. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I figured out that the year_flag is the issue. As I am still working with data from 2017 and we have already arrived in 2018, the year flag for my data set was "0" in all cases. As a consequence, my KPI could just display "0". &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Removing the year_flag solves the issue and provides me with the right results. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sorry for having bothered you with such a simplistic error &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;Gregor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2018 14:18:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Garbage-after-expression/m-p/1458814#M36003</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-04T14:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Garbage after expression</title>
      <link>https://community.qlik.com/t5/App-Development/Garbage-after-expression/m-p/1458815#M36004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad that it finally worked for you. Please close this thread by marking correct and helpful responses&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-14806"&gt;Qlik Community Tip: Marking Replies as Correct or Helpful&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2018 14:23:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Garbage-after-expression/m-p/1458815#M36004</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-01-04T14:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: Garbage after expression</title>
      <link>https://community.qlik.com/t5/App-Development/Garbage-after-expression/m-p/1458816#M36005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please do not randomly mark any response as correct.... only mark those responses which are truly correct and helpful which will help future visitors to this post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2018 14:27:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Garbage-after-expression/m-p/1458816#M36005</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-01-04T14:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: Garbage after expression</title>
      <link>https://community.qlik.com/t5/App-Development/Garbage-after-expression/m-p/1458817#M36006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you sir!! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2018 14:29:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Garbage-after-expression/m-p/1458817#M36006</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-01-04T14:29:49Z</dc:date>
    </item>
  </channel>
</rss>

