<?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 Excluding data in expression; Converting values in Script Editor in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Excluding-data-in-expression-Converting-values-in-Script-Editor/m-p/168403#M39572</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem, glad I could help. Try the same thing with set analysis, it should be faster.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Aug 2010 18:44:00 GMT</pubDate>
    <dc:creator>vgutkovsky</dc:creator>
    <dc:date>2010-08-19T18:44:00Z</dc:date>
    <item>
      <title>Excluding data in expression; Converting values in Script Editor</title>
      <link>https://community.qlik.com/t5/QlikView/Excluding-data-in-expression-Converting-values-in-Script-Editor/m-p/168400#M39569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;QUESTION 1&lt;/B&gt;: I'm trying to create an expression for a chart that, but I'm having some difficulty with the syntax.&lt;/P&gt;&lt;P&gt;The operation I want to perform is simply the [sum x/sum y] BUT restricted only to rows where values of X and Y are &amp;gt; 0.&lt;/P&gt;&lt;P&gt;If I type this in an expression window, all items are colored as expected, indicating my syntax is correct:&lt;BR /&gt;Where (MinutesWorked)&amp;gt;0 and (ResolutionTime)&amp;gt;0&lt;/P&gt;&lt;P&gt;And this, alone, when entered into the expression window appears correct as well:&lt;BR /&gt;Sum (MinutesWorked)/Sum (ResolutionTime)&lt;/P&gt;&lt;P&gt;But how do I join them?&lt;/P&gt;&lt;P&gt;If I put this in an expression window, everything after the second 0 is black, indicating the syntax is wrong:&lt;BR /&gt;Where (MinutesWorked)&amp;gt;0 and (ResolutionTime)&amp;gt;0 (Sum (MinutesWorked)/Sum (ResolutionTime))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;QUESTION 2&lt;/B&gt;: Making values in a column equivalent.&lt;/P&gt;&lt;P&gt;In my dataset, I found that a column for "Status" has two equivalent but differently spelled values--"On-Hold" and "On hold".&lt;/P&gt;&lt;P&gt;What would be the correct syntax in the Script editor for converting all values of "On hold" to "On-Hold" in the column "Status"?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much for your input!&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;!--EndFragment--&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 16:24:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excluding-data-in-expression-Converting-values-in-Script-Editor/m-p/168400#M39569</guid>
      <dc:creator />
      <dc:date>2010-08-19T16:24:05Z</dc:date>
    </item>
    <item>
      <title>Excluding data in expression; Converting values in Script Editor</title>
      <link>https://community.qlik.com/t5/QlikView/Excluding-data-in-expression-Converting-values-in-Script-Editor/m-p/168401#M39570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Answer 1: sum(if(x&amp;gt;0,x))/sum(if(y&amp;gt;0,y)). You can't use "where" in a chart expression; that's only valid syntax for the script. Alternatively, you can also use set analysis: sum({&amp;lt;X={"&amp;gt;0"}&amp;gt;} X)/sum({&amp;lt;Y={"&amp;gt;0"}&amp;gt;} Y)&lt;/P&gt;&lt;P&gt;Answer 2: Well, I can tell you right off the bat that it's preferable to scrub the data before you load it into QlikView. But if you want to make the conversion within QlikView, then the syntax would be: if(Status='On hold','On-Hold',Status) as Status&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 17:09:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excluding-data-in-expression-Converting-values-in-Script-Editor/m-p/168401#M39570</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2010-08-19T17:09:09Z</dc:date>
    </item>
    <item>
      <title>Excluding data in expression; Converting values in Script Editor</title>
      <link>https://community.qlik.com/t5/QlikView/Excluding-data-in-expression-Converting-values-in-Script-Editor/m-p/168402#M39571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much for your help, Vlad! With your guidance, I was able to refine the chart expression even further:&lt;BR /&gt;sum(if(x&amp;gt;0 and y&amp;gt;0,x))/sum(if(y&amp;gt;0 and x&amp;gt;0,y))&lt;/P&gt;&lt;P&gt;That allows me to remove from the calculation any row that has a value for x or y &amp;lt;0.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 18:18:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excluding-data-in-expression-Converting-values-in-Script-Editor/m-p/168402#M39571</guid>
      <dc:creator />
      <dc:date>2010-08-19T18:18:01Z</dc:date>
    </item>
    <item>
      <title>Excluding data in expression; Converting values in Script Editor</title>
      <link>https://community.qlik.com/t5/QlikView/Excluding-data-in-expression-Converting-values-in-Script-Editor/m-p/168403#M39572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem, glad I could help. Try the same thing with set analysis, it should be faster.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 18:44:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excluding-data-in-expression-Converting-values-in-Script-Editor/m-p/168403#M39572</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2010-08-19T18:44:00Z</dc:date>
    </item>
  </channel>
</rss>

