<?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 measure value based on range of another measure. in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Calculate-measure-value-based-on-range-of-another-measure/m-p/1895035#M73844</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have the below scenario where:&lt;/P&gt;
&lt;P&gt;I want to calculate value of sales value derived based on range of MPE Volume measure value:&lt;/P&gt;
&lt;P&gt;eg : if range of MPE Volume value is -5 to 5&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to calculate value of Sales value derived only for those MPE Volume values between -5 to 5 .&lt;/P&gt;
&lt;P&gt;I tried using set analysis as below but it is giving error:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;sum({&amp;lt;((sum([1_Forecast Quantity ZU Unit])-sum([Sales Qty ZU CHK]))*100)/sum([Sales Qty ZU CHK])={"&amp;gt;=-15&amp;lt;=20"}&amp;gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;aggr($(vSalesValueDerived),[Country key TEXT],Material,[Forecast Accuracy Period],[Profit Center]$(vRadio_Button))))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Iwin_0-1645247043104.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/72663i191C9E18BF867873/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Iwin_0-1645247043104.png" alt="Iwin_0-1645247043104.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also tried calculating it using if condition as below:&lt;/P&gt;
&lt;P&gt;if(MPE_Volume&amp;gt;-15 and MPE_volume &amp;lt;20,&lt;/P&gt;
&lt;P&gt;sum(Sales_derived)) but it is always giving the total value instead of value between the range.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 19 Feb 2022 05:09:08 GMT</pubDate>
    <dc:creator>Iwin</dc:creator>
    <dc:date>2022-02-19T05:09:08Z</dc:date>
    <item>
      <title>Calculate measure value based on range of another measure.</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-measure-value-based-on-range-of-another-measure/m-p/1895035#M73844</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have the below scenario where:&lt;/P&gt;
&lt;P&gt;I want to calculate value of sales value derived based on range of MPE Volume measure value:&lt;/P&gt;
&lt;P&gt;eg : if range of MPE Volume value is -5 to 5&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to calculate value of Sales value derived only for those MPE Volume values between -5 to 5 .&lt;/P&gt;
&lt;P&gt;I tried using set analysis as below but it is giving error:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;sum({&amp;lt;((sum([1_Forecast Quantity ZU Unit])-sum([Sales Qty ZU CHK]))*100)/sum([Sales Qty ZU CHK])={"&amp;gt;=-15&amp;lt;=20"}&amp;gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;aggr($(vSalesValueDerived),[Country key TEXT],Material,[Forecast Accuracy Period],[Profit Center]$(vRadio_Button))))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Iwin_0-1645247043104.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/72663i191C9E18BF867873/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Iwin_0-1645247043104.png" alt="Iwin_0-1645247043104.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also tried calculating it using if condition as below:&lt;/P&gt;
&lt;P&gt;if(MPE_Volume&amp;gt;-15 and MPE_volume &amp;lt;20,&lt;/P&gt;
&lt;P&gt;sum(Sales_derived)) but it is always giving the total value instead of value between the range.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Feb 2022 05:09:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-measure-value-based-on-range-of-another-measure/m-p/1895035#M73844</guid>
      <dc:creator>Iwin</dc:creator>
      <dc:date>2022-02-19T05:09:08Z</dc:date>
    </item>
  </channel>
</rss>

