<?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: How to divide sum/sum using multiple if statements ? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-divide-sum-sum-using-multiple-if-statements/m-p/1565961#M441720</link>
    <description>&lt;P&gt;But your formula won't work in my case because I have multiple if match statements to display different measures.&lt;BR /&gt;&lt;BR /&gt;Something like this what Vishal has posted would work..the 3rd formula that has sum(numerator)/sum(denominator) needs tweaking. I'm not sure how to rewrite it ?&lt;BR /&gt;&lt;BR /&gt;If(match(Label,'A') and match(Client,'X'), Sum(Measure),&lt;BR /&gt;If(match(Label,'B') and match(Client,'Y'), Sum(Measure),&lt;BR /&gt;If(match(Label,'C','D') and match(Client,'Z','W'),Sum(Measure)/Sum(Measure))))&lt;/P&gt;</description>
    <pubDate>Fri, 05 Apr 2019 17:48:22 GMT</pubDate>
    <dc:creator>bob654321</dc:creator>
    <dc:date>2019-04-05T17:48:22Z</dc:date>
    <item>
      <title>How to divide sum/sum using multiple if statements ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-divide-sum-sum-using-multiple-if-statements/m-p/1565946#M441714</link>
      <description>&lt;P&gt;Below is how I'm calculating my expression.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If Label = 'A' and Client = 'X' ,Sum(Measure),&lt;/P&gt;&lt;P&gt;If Label = 'B' and Client = 'Y', Sum(Measure)&lt;/P&gt;&lt;P&gt;If Label = 'C' and Client = 'Z', Sum(measure)/If Label = 'D' and Client = 'W', Sum(measure) )))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first 2 if statements worked perfectly but the last if statement to calculate the division is not working. It doesn't display any value on the dashboard. How can I do the sum / sum using if statements ?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 17:11:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-divide-sum-sum-using-multiple-if-statements/m-p/1565946#M441714</guid>
      <dc:creator>bob654321</dc:creator>
      <dc:date>2019-04-05T17:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to divide sum/sum using multiple if statements ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-divide-sum-sum-using-multiple-if-statements/m-p/1565952#M441716</link>
      <description>Try this,&lt;BR /&gt;&lt;BR /&gt;If(match(Label,'A') and match(Client,'X'), Sum(Measure),&lt;BR /&gt;If(match(Label,'B') and match(Client,'Y'), Sum(Measure),&lt;BR /&gt;If(match(Label,'C','D') and match(Client,'Z','W'),Sum(Measure)/Sum(Measure))))&lt;BR /&gt;&lt;BR /&gt;However i didn't understand why you are using same expression for all condition.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Vishal</description>
      <pubDate>Fri, 05 Apr 2019 17:20:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-divide-sum-sum-using-multiple-if-statements/m-p/1565952#M441716</guid>
      <dc:creator>VishalWaghole</dc:creator>
      <dc:date>2019-04-05T17:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to divide sum/sum using multiple if statements ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-divide-sum-sum-using-multiple-if-statements/m-p/1565953#M441717</link>
      <description>&lt;P&gt;Thank you! I'm using different measures and calling it as Measure in the load script and concatenating them individually using the label field.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example&lt;/P&gt;&lt;P&gt;Load Sum(Sales),'A' as Label,'X' as Client from qvd;&lt;/P&gt;&lt;P&gt;CONCATENATE&lt;/P&gt;&lt;P&gt;Load Sum(Profit),'B' as Label,'Y' as Client from qvd;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will try your logic and let you know if it works or not.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 17:24:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-divide-sum-sum-using-multiple-if-statements/m-p/1565953#M441717</guid>
      <dc:creator>bob654321</dc:creator>
      <dc:date>2019-04-05T17:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to divide sum/sum using multiple if statements ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-divide-sum-sum-using-multiple-if-statements/m-p/1565958#M441718</link>
      <description>&lt;P&gt;Unfortunately your formula that uses sum(Measure)/Sum(Measure) is being displayed as 1. How to rewrite this formula properly?&lt;BR /&gt;If(match(Label,'C') and match(Client,'Z'),Sum(Measure)/If(match(Label,'D') and match(Client,'Z'),Sum(Measure))))&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 17:37:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-divide-sum-sum-using-multiple-if-statements/m-p/1565958#M441718</guid>
      <dc:creator>bob654321</dc:creator>
      <dc:date>2019-04-05T17:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to divide sum/sum using multiple if statements ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-divide-sum-sum-using-multiple-if-statements/m-p/1565960#M441719</link>
      <description>&lt;P&gt;&amp;nbsp;try this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(Sum({&amp;lt;Label = {'A'} ,Client ={'X'}&amp;gt;}Measure) +&amp;nbsp;Sum({&amp;lt;Label = {'B'} ,Client ={'Y'}&amp;gt;}Measure) +&amp;nbsp;Sum({&amp;lt;Label = {'C'} ,Client ={'Z'}&amp;gt;}Measure) )/(Sum({&amp;lt;Label = {'D'} ,Client ={'W'}&amp;gt;}Measure) )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ENJOY !!!&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 17:44:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-divide-sum-sum-using-multiple-if-statements/m-p/1565960#M441719</guid>
      <dc:creator>Marcos_rv</dc:creator>
      <dc:date>2019-04-05T17:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to divide sum/sum using multiple if statements ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-divide-sum-sum-using-multiple-if-statements/m-p/1565961#M441720</link>
      <description>&lt;P&gt;But your formula won't work in my case because I have multiple if match statements to display different measures.&lt;BR /&gt;&lt;BR /&gt;Something like this what Vishal has posted would work..the 3rd formula that has sum(numerator)/sum(denominator) needs tweaking. I'm not sure how to rewrite it ?&lt;BR /&gt;&lt;BR /&gt;If(match(Label,'A') and match(Client,'X'), Sum(Measure),&lt;BR /&gt;If(match(Label,'B') and match(Client,'Y'), Sum(Measure),&lt;BR /&gt;If(match(Label,'C','D') and match(Client,'Z','W'),Sum(Measure)/Sum(Measure))))&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 17:48:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-divide-sum-sum-using-multiple-if-statements/m-p/1565961#M441720</guid>
      <dc:creator>bob654321</dc:creator>
      <dc:date>2019-04-05T17:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to divide sum/sum using multiple if statements ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-divide-sum-sum-using-multiple-if-statements/m-p/1565963#M441721</link>
      <description>&lt;P&gt;this is to use it in a KPI ??&lt;/P&gt;&lt;P&gt;if so, think that every time you use the sum () these (I'm using it 3 times) have in the set analisys set the conditions, each one has different value, you could build a simple table and you will see that they give the expected values .&lt;/P&gt;&lt;P&gt;it is understood???&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 17:52:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-divide-sum-sum-using-multiple-if-statements/m-p/1565963#M441721</guid>
      <dc:creator>Marcos_rv</dc:creator>
      <dc:date>2019-04-05T17:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to divide sum/sum using multiple if statements ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-divide-sum-sum-using-multiple-if-statements/m-p/1565965#M441722</link>
      <description>Could you please share some sample data which will cover your last condition.</description>
      <pubDate>Fri, 05 Apr 2019 17:53:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-divide-sum-sum-using-multiple-if-statements/m-p/1565965#M441722</guid>
      <dc:creator>VishalWaghole</dc:creator>
      <dc:date>2019-04-05T17:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to divide sum/sum using multiple if statements ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-divide-sum-sum-using-multiple-if-statements/m-p/1565979#M441724</link>
      <description>&lt;P&gt;Vishal,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See the sample exel report with the data in the attachment.&lt;/P&gt;&lt;P&gt;your formula works for straight measures that doesn't involve division or multiplication.&lt;BR /&gt;But it won't work when we have to divide the 2 measures.&lt;/P&gt;&lt;P&gt;For example , if the label = 'B' and client = Y' then Sum(Measure where label = 'B' and client = Y')/Sum(Measure where label = 'D' and Client = 'W')&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 18:39:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-divide-sum-sum-using-multiple-if-statements/m-p/1565979#M441724</guid>
      <dc:creator>bob654321</dc:creator>
      <dc:date>2019-04-05T18:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to divide sum/sum using multiple if statements ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-divide-sum-sum-using-multiple-if-statements/m-p/1566002#M441725</link>
      <description>&lt;P&gt;&lt;SPAN&gt;prueba esto siempre y cuando no estés&amp;nbsp;filtrando por Label o Client, pero si usas otros filtro o muestras en unas tabla de esta manera debería&amp;nbsp;funcionar:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sum({&amp;lt;Label = {'A'} ,Client ={'X'}&amp;gt;}&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Measure) +&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sum({&amp;lt;Label = {'B'} ,Client ={'Y'}&amp;gt;} Measure) +&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(Sum({&amp;lt;Label = {'C'} ,Client ={'Z'}&amp;gt;} Measure) )/(Sum({&amp;lt;Label = {'D'} ,Client ={'W'}&amp;gt;}Measure) )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Saludos!!!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 20:04:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-divide-sum-sum-using-multiple-if-statements/m-p/1566002#M441725</guid>
      <dc:creator>Marcos_rv</dc:creator>
      <dc:date>2019-04-05T20:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to divide sum/sum using multiple if statements ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-divide-sum-sum-using-multiple-if-statements/m-p/1566005#M441726</link>
      <description>Marcos, is there any reason why there is a plus sign between the Sums ? The Sum(Measures) should be shown separately in each cell.</description>
      <pubDate>Fri, 05 Apr 2019 20:17:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-divide-sum-sum-using-multiple-if-statements/m-p/1566005#M441726</guid>
      <dc:creator>bob654321</dc:creator>
      <dc:date>2019-04-05T20:17:13Z</dc:date>
    </item>
  </channel>
</rss>

