<?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 Order of Operations for Calculation in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Order-of-Operations-for-Calculation/m-p/1824907#M67760</link>
    <description>&lt;P&gt;I have a calculated field that produces a rate.&lt;/P&gt;&lt;P&gt;count({$&amp;lt;[Type] = {'C'}&amp;gt;} distinct [Number])&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;Sum(Total_Units)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need the square root of the result.&amp;nbsp; I've tried the following, including adding extra parenthesis so the rate is calculated before the sqrt.&amp;nbsp; However, it's taking the square root of count({$&amp;lt;[Type] = {'C'}&amp;gt;} distinct [Number]) before dividing by Sum(Total_Units)).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know how to get the total result and then take the square root?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sqrt(&lt;/P&gt;&lt;P&gt;(count({$&amp;lt;[Type] = {'C'}&amp;gt;} distinct [Number])&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;Sum(Total_Units))&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
    <pubDate>Tue, 27 Jul 2021 15:31:33 GMT</pubDate>
    <dc:creator>edg</dc:creator>
    <dc:date>2021-07-27T15:31:33Z</dc:date>
    <item>
      <title>Order of Operations for Calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Order-of-Operations-for-Calculation/m-p/1824907#M67760</link>
      <description>&lt;P&gt;I have a calculated field that produces a rate.&lt;/P&gt;&lt;P&gt;count({$&amp;lt;[Type] = {'C'}&amp;gt;} distinct [Number])&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;Sum(Total_Units)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need the square root of the result.&amp;nbsp; I've tried the following, including adding extra parenthesis so the rate is calculated before the sqrt.&amp;nbsp; However, it's taking the square root of count({$&amp;lt;[Type] = {'C'}&amp;gt;} distinct [Number]) before dividing by Sum(Total_Units)).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know how to get the total result and then take the square root?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sqrt(&lt;/P&gt;&lt;P&gt;(count({$&amp;lt;[Type] = {'C'}&amp;gt;} distinct [Number])&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;Sum(Total_Units))&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 15:31:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Order-of-Operations-for-Calculation/m-p/1824907#M67760</guid>
      <dc:creator>edg</dc:creator>
      <dc:date>2021-07-27T15:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Order of Operations for Calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Order-of-Operations-for-Calculation/m-p/1824924#M67763</link>
      <description>&lt;P&gt;I'm not able to replicate your example...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Or_2-1627402601060.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59254i070D944A0AAF36EC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Or_2-1627402601060.png" alt="Or_2-1627402601060.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the above, the result of the final sqrt() formlua is correct - sqrt(4/400) = sqrt(0.01) = 0.1. If it were sqrt(4)/400 as you describe, the result would be 0.005 instead.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 16:16:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Order-of-Operations-for-Calculation/m-p/1824924#M67763</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2021-07-27T16:16:48Z</dc:date>
    </item>
  </channel>
</rss>

