<?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 Calculate Result In If Statements Problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculate-Result-In-If-Statements-Problem/m-p/924016#M468993</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having problem with calculating result from two expressions in the if statement. Please help!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what I have:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;STRONG style="text-decoration: underline;"&gt;count_intervals&lt;/STRONG&gt; is calculated by &lt;SPAN style="color: #ff9900;"&gt;orange expression&lt;/SPAN&gt;. Now, I need to take the total sum (12) of this &lt;STRONG style="text-decoration: underline;"&gt;count_intervals&lt;/STRONG&gt; divide it by 18 for each &lt;STRONG style="text-decoration: underline;"&gt;&lt;EM&gt;% Core Intervals Met SL Goal&lt;/EM&gt;&lt;/STRONG&gt; where &lt;STRONG style="text-decoration: underline;"&gt;count_intervals&lt;/STRONG&gt; equals 1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This expression does not return correct result as you can see in the picture below.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; color: #ff0000;"&gt;((Sum (met_core_sl))/(Sum (answered_call))&amp;gt;.8&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;(sum(total(&lt;/SPAN&gt;&lt;SPAN style="color: #ff9900;"&gt;if((Sum (met_core_sl)/Sum (answered_call))&amp;gt;.8, 1,0))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;))/18,0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;&lt;IMG alt="Untitled.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/94693_Untitled.png" style="height: auto;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I replace the orange expression with below, it returns all zeros instead of dashes.&lt;/P&gt;&lt;P&gt;if((Sum (met_core_sl))/(Sum (answered_call))&amp;gt;.8, sum(total(&lt;SPAN style="color: #ff9900;"&gt;count_intervals&lt;/SPAN&gt;))/18,0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your input everyone.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 Jul 2015 13:41:51 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-07-31T13:41:51Z</dc:date>
    <item>
      <title>Calculate Result In If Statements Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-Result-In-If-Statements-Problem/m-p/924016#M468993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having problem with calculating result from two expressions in the if statement. Please help!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what I have:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;STRONG style="text-decoration: underline;"&gt;count_intervals&lt;/STRONG&gt; is calculated by &lt;SPAN style="color: #ff9900;"&gt;orange expression&lt;/SPAN&gt;. Now, I need to take the total sum (12) of this &lt;STRONG style="text-decoration: underline;"&gt;count_intervals&lt;/STRONG&gt; divide it by 18 for each &lt;STRONG style="text-decoration: underline;"&gt;&lt;EM&gt;% Core Intervals Met SL Goal&lt;/EM&gt;&lt;/STRONG&gt; where &lt;STRONG style="text-decoration: underline;"&gt;count_intervals&lt;/STRONG&gt; equals 1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This expression does not return correct result as you can see in the picture below.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; color: #ff0000;"&gt;((Sum (met_core_sl))/(Sum (answered_call))&amp;gt;.8&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;(sum(total(&lt;/SPAN&gt;&lt;SPAN style="color: #ff9900;"&gt;if((Sum (met_core_sl)/Sum (answered_call))&amp;gt;.8, 1,0))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;))/18,0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;&lt;IMG alt="Untitled.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/94693_Untitled.png" style="height: auto;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I replace the orange expression with below, it returns all zeros instead of dashes.&lt;/P&gt;&lt;P&gt;if((Sum (met_core_sl))/(Sum (answered_call))&amp;gt;.8, sum(total(&lt;SPAN style="color: #ff9900;"&gt;count_intervals&lt;/SPAN&gt;))/18,0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your input everyone.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2015 13:41:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-Result-In-If-Statements-Problem/m-p/924016#M468993</guid>
      <dc:creator />
      <dc:date>2015-07-31T13:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Result In If Statements Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-Result-In-If-Statements-Problem/m-p/924017#M468994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you need advanced aggregation here to embed your Sum() aggregations into another Sum() aggregation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look into advanced aggregation examples into the help, like 'Sum of rows in pivot tables' (even if you are not using a pivot table).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are not showing full information about your chart, like the dimensions used (it's in general much easier to help if you post a small sample qvw). I am assuming a single dimension called Dim1. Then your expression might look like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #ff0000;"&gt;((Sum (met_core_sl))/(Sum (answered_call))&amp;gt;.8&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;Sum(total &lt;STRONG&gt;aggr&lt;/STRONG&gt;( &lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #ff9900;"&gt;if((Sum (met_core_sl)/Sum (answered_call))&amp;gt;.8, 1,0) , &lt;STRONG&gt;Dim1&lt;/STRONG&gt; )&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;) /18&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,0)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Aug 2015 09:17:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-Result-In-If-Statements-Problem/m-p/924017#M468994</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-08-01T09:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Result In If Statements Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-Result-In-If-Statements-Problem/m-p/924018#M468995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Swuehl! That's what I want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 17:07:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-Result-In-If-Statements-Problem/m-p/924018#M468995</guid>
      <dc:creator />
      <dc:date>2015-08-04T17:07:43Z</dc:date>
    </item>
  </channel>
</rss>

