<?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 Set analysis Only() Question in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-Only-Question/m-p/1315636#M408516</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Qlik community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to return different allocation amounts based on customer account selections. The majority of customer accounts have no allocations, but if they do, I need to return what percent is allocated, I have the following bit of code and it isn't doing what I want it to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Only({1&amp;lt;AllocatedSalesPartner={"$(vPartnerSelection)"}&amp;gt;} Allocations) * .01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code returns an allocation amount if the customer account is allocated but that is all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My goal with this code is to say return the Allocation if the AllocatedSalesPartner is equal to vPartnerSelection or return 1 if there is no allocation available. My data is laid out such that most customer accounts have no allocations associated with them and so that Allocations is null for most customers. I have played around with adding an if(isnull() beforehand but that didn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions? Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 May 2017 22:08:23 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-05-22T22:08:23Z</dc:date>
    <item>
      <title>Set analysis Only() Question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Only-Question/m-p/1315636#M408516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Qlik community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to return different allocation amounts based on customer account selections. The majority of customer accounts have no allocations, but if they do, I need to return what percent is allocated, I have the following bit of code and it isn't doing what I want it to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Only({1&amp;lt;AllocatedSalesPartner={"$(vPartnerSelection)"}&amp;gt;} Allocations) * .01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code returns an allocation amount if the customer account is allocated but that is all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My goal with this code is to say return the Allocation if the AllocatedSalesPartner is equal to vPartnerSelection or return 1 if there is no allocation available. My data is laid out such that most customer accounts have no allocations associated with them and so that Allocations is null for most customers. I have played around with adding an if(isnull() beforehand but that didn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions? Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 May 2017 22:08:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Only-Question/m-p/1315636#M408516</guid>
      <dc:creator />
      <dc:date>2017-05-22T22:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis Only() Question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Only-Question/m-p/1315637#M408517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is good to see a fragment of the original data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Andrey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 May 2017 06:54:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Only-Question/m-p/1315637#M408517</guid>
      <dc:creator>ahaahaaha</dc:creator>
      <dc:date>2017-05-23T06:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis Only() Question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Only-Question/m-p/1315638#M408518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Only({1&amp;lt;AllocatedSalesPartner={"$(vPartnerSelection)"}&amp;gt;} &lt;SPAN style="color: #ff0000;"&gt;Alt(&lt;/SPAN&gt;Allocations, 1)&lt;SPAN style="color: #ff0000;"&gt;)&lt;/SPAN&gt; * .01&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 May 2017 08:50:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Only-Question/m-p/1315638#M408518</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-05-23T08:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis Only() Question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Only-Question/m-p/1315639#M408519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey all, here's a sample of my data and my goal of what I'm looking for, I'm thinking that what I needed to change was the AllocationPercent but it is possible that set analysis may work using another expression.&lt;/P&gt;&lt;P&gt;My goal is to get to the Final Alloc Sales numbers below without having to use all of the additional columns:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="164426" alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/164426_Capture.PNG" style="height: 177px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;In this chart table, CustomerNumber, and AllocatedSalesPartner are all dimensions, with everything else being expressions. I want to remove the AllocatedSalesPartner as a dimension, but when I do this is what happens:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="164427" alt="Capture2.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/164427_Capture2.PNG" style="height: 195px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For reference the formula for Final Alloc Sales is:&lt;/P&gt;&lt;P&gt;=if( [Net Sales] - [Direct Sales&lt;/P&gt;&lt;P&gt;(After Allocations)] &amp;gt;0, 0, [Direct Sales&lt;/P&gt;&lt;P&gt;(After Allocations)]) + [Allocations Add Back]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The formula for AllocationPercent is =Only({1&amp;lt;AllocatedSalesPartner={"$(vPartnerSelection)"}&amp;gt;} Allocations) * .01 and I used that instead of Simply &lt;EM&gt;Allocations * .01&lt;/EM&gt; because if I do that, It will not select the Allocation for the partner that is being selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that part of my probloem may be that Direct Sales (After Allocations) is&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=if(Partner = AllocatedSalesPartner, [Net Sales] * [AllocationPercent],&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(isnull(AllocatedSalesPartner), [Net Sales]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I remove the AllocatedSalesPartner dimension, Qlikview doesn't know how to check against the Partner selected..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 May 2017 13:54:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Only-Question/m-p/1315639#M408519</guid>
      <dc:creator />
      <dc:date>2017-05-23T13:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis Only() Question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Only-Question/m-p/1315640#M408520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ended up solving my problem using separated sets, the "*" in between the clauses means include all sales where the SalesDate matches the selected date, the partner matches the partner selected, and there is no AllocatedSalesPartner&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;SalesDate = {$(=concat(chr(39) &amp;amp; Date(Date, 'M/D/YYYY') &amp;amp; chr(39), ',') )}&amp;gt; * &amp;lt;Partner={"$(vPartnerSelection)"}&amp;gt; * -&amp;lt;AllocatedSalesPartner={"*"}&amp;gt; * &amp;lt;ProductCommissionGroup={"01","03"}&amp;gt; * &amp;lt;CustomerPriceGroup={"02","06"}&amp;gt;} InvoiceSales) + &lt;/P&gt;&lt;P&gt;sum({$&amp;lt;SalesDate = {$(=concat(chr(39) &amp;amp; Date(Date, 'M/D/YYYY') &amp;amp; chr(39), ',') )}&amp;gt; * &amp;lt;Partner={"$(vPartnerSelection)"}&amp;gt; * -&amp;lt;AllocatedSalesPartner={"*"}&amp;gt; * &amp;lt;ProductCommissionGroup={"01"}&amp;gt; * &amp;lt;CustomerPriceGroup={"25","28","30","32"}&amp;gt;} InvoiceSales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 May 2017 15:14:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Only-Question/m-p/1315640#M408520</guid>
      <dc:creator />
      <dc:date>2017-05-23T15:14:59Z</dc:date>
    </item>
  </channel>
</rss>

