<?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: Set Analysis in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-Analysis/m-p/1974267#M80360</link>
    <description>&lt;P&gt;Generally speaking, if you want your set analysis to impact the entire expression, you need the entire expression to be contained within the aggregation functions. In your current expression, this is not the case as partPieceWeight, shippingUnitTareWeight, and packageQuantity are all outside the aggregation functions, which means they are not impacted by set analysis and will also return null if there is more than one possible value or if there are no possible values for any of them. &lt;/P&gt;</description>
    <pubDate>Mon, 29 Aug 2022 13:40:57 GMT</pubDate>
    <dc:creator>Or</dc:creator>
    <dc:date>2022-08-29T13:40:57Z</dc:date>
    <item>
      <title>Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis/m-p/1974265#M80359</link>
      <description>&lt;P&gt;Hi ,&lt;BR /&gt;The basic calculation:&lt;BR /&gt;((Sum(Quantity)*(partPieceWeight))+((Sum(Quantity)*(shippingUnitTareWeight))/packageQuantity))*0.453592&lt;BR /&gt;&lt;BR /&gt;I'm trying to use the below expression,&lt;BR /&gt;&lt;BR /&gt;=round((((sum({&amp;lt;$(='[CMMS '&amp;amp;vBOH &amp;amp;' BOH Days]')={"&amp;gt;=$(vStart) &amp;lt;=$(vEnd)"},[Production Status]={"1"},%ReleaseSupplier = ,%Conveyance =&amp;gt;} Quantity)*partPieceWeight))&lt;BR /&gt;&lt;BR /&gt;+&lt;BR /&gt;((sum({&amp;lt;$(='[CMMS '&amp;amp;vBOH &amp;amp;' BOH Days]')={"&amp;gt;=$(vStart) &amp;lt;=$(vEnd)"},[Production Status]={1},%ReleaseSupplier = ,%Conveyance =&amp;gt;} Quantity)*(shippingUnitTareWeight/packageQuantity))))*0.453592)&lt;BR /&gt;&lt;BR /&gt;The first part is summing the quantity then multiplying with part weight for the production status 1.&lt;BR /&gt;&lt;BR /&gt;The second part is summing the quantity and then multiplying with (shippingunit/packagequantity) for the production status 1.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The above expression works when I'm on particular part for one store. &lt;BR /&gt;&lt;BR /&gt;When I'm looking for the same part with different stores it is showing -&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can someone help me with this?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 13:35:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis/m-p/1974265#M80359</guid>
      <dc:creator>Husky_Bab12</dc:creator>
      <dc:date>2022-08-29T13:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis/m-p/1974267#M80360</link>
      <description>&lt;P&gt;Generally speaking, if you want your set analysis to impact the entire expression, you need the entire expression to be contained within the aggregation functions. In your current expression, this is not the case as partPieceWeight, shippingUnitTareWeight, and packageQuantity are all outside the aggregation functions, which means they are not impacted by set analysis and will also return null if there is more than one possible value or if there are no possible values for any of them. &lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 13:40:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis/m-p/1974267#M80360</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-08-29T13:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis/m-p/1974273#M80362</link>
      <description>&lt;P&gt;if i include them my results are overestimated.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;example for a part to two different store is including for two stores is 23 .&lt;BR /&gt;&lt;BR /&gt;for&amp;nbsp; one store is 12&lt;BR /&gt;&lt;BR /&gt;The approach I made similar to you said&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;=(sum({&amp;lt;$(='[CMMS '&amp;amp;vBOH &amp;amp;' BOH Days]')={"&amp;gt;=$(vStart) &amp;lt;=$(vEnd)"},[Production Status]={1},%ReleaseSupplier = ,%Conveyance =&amp;gt;} Quantity*partPieceWeight))&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;+&lt;BR /&gt;(sum({&amp;lt;$(='[CMMS '&amp;amp;vBOH &amp;amp;' BOH Days]')={"&amp;gt;=$(vStart) &amp;lt;=$(vEnd)"},[Production Status]={1},%ReleaseSupplier = ,%Conveyance =&amp;gt;} (Quantity*(shippingUnitTareWeight/packageQuantity)))&lt;BR /&gt;&lt;BR /&gt;showing me 46.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 13:50:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis/m-p/1974273#M80362</guid>
      <dc:creator>Husky_Bab12</dc:creator>
      <dc:date>2022-08-29T13:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis/m-p/1974286#M80363</link>
      <description>&lt;P&gt;Since I can't see your data or data structure, I can't actually help you with this issue - it sounds like you have a duplication / one to many situation for these fields which is causing both the duplication and the return of null without the aggregation. I'd suggest you investigate that by placing each section of your code into a different expression/measure and then figuring out which one(s) don't return a single value for your rows.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 13:58:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis/m-p/1974286#M80363</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-08-29T13:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis/m-p/1974345#M80372</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6142"&gt;@Or&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;I checked with the data. It does not have any duplicates.&lt;BR /&gt;&lt;BR /&gt;But I noticed with the below expression,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;=(sum({&amp;lt;$(='[CMMS '&amp;amp;vBOH &amp;amp;' BOH Days]')={"&amp;gt;=$(vStart) &amp;lt;=$(vEnd)"},[Production Status]={"1"},%ReleaseSupplier = ,%Conveyance =&amp;gt;} Quantity*partPieceWeight))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;when the quantity is 7371 and partpieceweight is 0.12,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Expected value is 831&lt;BR /&gt;&lt;BR /&gt;But actual is 1789.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I want to sum the quantity and then multiply with partpieceweight.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 15:19:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis/m-p/1974345#M80372</guid>
      <dc:creator>Husky_Bab12</dc:creator>
      <dc:date>2022-08-29T15:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis/m-p/1974372#M80376</link>
      <description>&lt;P&gt;If the quantity is in fact 7371, and the weight is in fact 0.12, and there is no duplication, then you should get a result of 7371*0.12. If you do not, that suggests that one of the above is not correct - either there is duplication, or the weight is not actually 0.12 for all rows, or the quantity is not 7371. As I suggested before, you should try and isolate the issue by summing the quantity separately, and getting an Only(partPieceWeight) with all of the set analysis added to confirm that weight is in fact 0.12 for all cases. If both of those are the case, I'd suggest checking for cases where the weight for a specific row is null (since null wouldn't break the only().&lt;/P&gt;
&lt;P&gt;Another alternative approach is to add all of the fields from your fact table as table dimensions, and then trying to see if there are any cases where things aren't as expected.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 16:32:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis/m-p/1974372#M80376</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-08-29T16:32:27Z</dc:date>
    </item>
  </channel>
</rss>

