<?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 Agreggation and set analysis with parameters in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Agreggation-and-set-analysis-with-parameters/m-p/1451400#M802390</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all !!&lt;/P&gt;&lt;P&gt;I've been facing a problem for several days and I am completly stuck! Maybe you can bring a bit of light to the matter.&lt;/P&gt;&lt;P&gt;I have a table with some dimensions, the one that matters now is [ID]. If ID is a certain value I want to call a variable. Following you can see it:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;VARIABLE:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;weightedmean=sum({&amp;lt;$1,$2,$3,$4,$5,$6,$7,$8 &amp;gt;} Aggr(DISTINCT Csat_Target * Weights, link_targets)) / sum({&amp;lt;$1,$2,$3,$4,$5,$6,$7,$8 &amp;gt;} Aggr(DISTINCT Weights, link_targets) )&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;EM&gt;EXPRESSION:&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;if(ID=4,$(weightedmean(FY={'FY17-Q1'} ) ) )&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If instead i use the expression without the If condition, the variable is doing calculations, but with it only returns 0.&lt;/P&gt;&lt;P&gt;Somehow, this is not working, at all. I've been looking for workarounds but I am working in a complex QV document and it should be done in this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will provide further information or any kind of extra help you need.&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;&lt;P&gt;May The Qlik be with you &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mensaje editado por: Lluis Cierco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Agreggation and set analysis with parameters</title>
      <link>https://community.qlik.com/t5/QlikView/Agreggation-and-set-analysis-with-parameters/m-p/1451400#M802390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all !!&lt;/P&gt;&lt;P&gt;I've been facing a problem for several days and I am completly stuck! Maybe you can bring a bit of light to the matter.&lt;/P&gt;&lt;P&gt;I have a table with some dimensions, the one that matters now is [ID]. If ID is a certain value I want to call a variable. Following you can see it:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;VARIABLE:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;weightedmean=sum({&amp;lt;$1,$2,$3,$4,$5,$6,$7,$8 &amp;gt;} Aggr(DISTINCT Csat_Target * Weights, link_targets)) / sum({&amp;lt;$1,$2,$3,$4,$5,$6,$7,$8 &amp;gt;} Aggr(DISTINCT Weights, link_targets) )&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;EM&gt;EXPRESSION:&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;if(ID=4,$(weightedmean(FY={'FY17-Q1'} ) ) )&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If instead i use the expression without the If condition, the variable is doing calculations, but with it only returns 0.&lt;/P&gt;&lt;P&gt;Somehow, this is not working, at all. I've been looking for workarounds but I am working in a complex QV document and it should be done in this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will provide further information or any kind of extra help you need.&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;&lt;P&gt;May The Qlik be with you &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mensaje editado por: Lluis Cierco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Agreggation-and-set-analysis-with-parameters/m-p/1451400#M802390</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Agreggation and set analysis with parameters</title>
      <link>https://community.qlik.com/t5/QlikView/Agreggation-and-set-analysis-with-parameters/m-p/1451401#M802391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lluis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to provide the sample app for check?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Nov 2017 13:45:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Agreggation-and-set-analysis-with-parameters/m-p/1451401#M802391</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2017-11-24T13:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: Agreggation and set analysis with parameters</title>
      <link>https://community.qlik.com/t5/QlikView/Agreggation-and-set-analysis-with-parameters/m-p/1451402#M802392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can not provide the original but i am making one with sample data &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Nov 2017 13:51:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Agreggation-and-set-analysis-with-parameters/m-p/1451402#M802392</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-24T13:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: Agreggation and set analysis with parameters</title>
      <link>https://community.qlik.com/t5/QlikView/Agreggation-and-set-analysis-with-parameters/m-p/1451403#M802393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just edited the original post to add the sample &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;Hope it helps! Can not understand what is going on :S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Nov 2017 14:07:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Agreggation-and-set-analysis-with-parameters/m-p/1451403#M802393</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-24T14:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: Agreggation and set analysis with parameters</title>
      <link>https://community.qlik.com/t5/QlikView/Agreggation-and-set-analysis-with-parameters/m-p/1451404#M802394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you try to add the 'ID' into the variable and check?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit;"&gt;Variable : &lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;weightedmean =&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;sum({&amp;lt;$1&amp;gt;} Aggr(DISTINCT Csat_Target * Weights, link_targets,&lt;SPAN style="color: #ff0000;"&gt;ID&lt;/SPAN&gt;)) / sum( {&amp;lt;$1&amp;gt;} Aggr(DISTINCT Weights, link_targets,&lt;SPAN style="color: #ff0000;"&gt;ID&lt;/SPAN&gt;) )&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Nov 2017 14:20:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Agreggation-and-set-analysis-with-parameters/m-p/1451404#M802394</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2017-11-24T14:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Agreggation and set analysis with parameters</title>
      <link>https://community.qlik.com/t5/QlikView/Agreggation-and-set-analysis-with-parameters/m-p/1451405#M802395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nice!! It worked out!! &lt;/P&gt;&lt;P&gt;Thanks a lot! &lt;/P&gt;&lt;P&gt;I spent a lot of time on it and couldn't happen to think on this! &lt;/P&gt;&lt;P&gt;Good job &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Nov 2017 14:23:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Agreggation-and-set-analysis-with-parameters/m-p/1451405#M802395</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-24T14:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: Agreggation and set analysis with parameters</title>
      <link>https://community.qlik.com/t5/QlikView/Agreggation-and-set-analysis-with-parameters/m-p/1451406#M802396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of the above variable, may be you can try this one for the variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Aggr(distinct sum({&amp;lt;$1&amp;gt;}Csat_Target * Weights) / sum({&amp;lt;$1&amp;gt;}Weights), ID)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Nov 2017 14:42:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Agreggation-and-set-analysis-with-parameters/m-p/1451406#M802396</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2017-11-24T14:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Agreggation and set analysis with parameters</title>
      <link>https://community.qlik.com/t5/QlikView/Agreggation-and-set-analysis-with-parameters/m-p/1451407#M802397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the improvement and interest!!&lt;/P&gt;&lt;P&gt;This works fine as well.&lt;/P&gt;&lt;P&gt;In my very particular case (not the sample but the original) I can't&amp;nbsp; apply this becose i need to make the sums only once for each linked_targed. It is complicated to explain here all, but I just wanted to point out the 1st option have this difference from this one. &lt;/P&gt;&lt;P&gt;(In my particular case each link_targets has many duplicates of the weights and this causes error in the calculations, the 1st solution proposed is the one that can accomplish this). &lt;/P&gt;&lt;P&gt;Thanks again for the help! And nice idea &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Nov 2017 15:06:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Agreggation-and-set-analysis-with-parameters/m-p/1451407#M802397</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-24T15:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: Agreggation and set analysis with parameters</title>
      <link>https://community.qlik.com/t5/QlikView/Agreggation-and-set-analysis-with-parameters/m-p/1451408#M802398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No Problem. Welcome &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Nov 2017 15:13:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Agreggation-and-set-analysis-with-parameters/m-p/1451408#M802398</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2017-11-24T15:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Agreggation and set analysis with parameters</title>
      <link>https://community.qlik.com/t5/QlikView/Agreggation-and-set-analysis-with-parameters/m-p/1451409#M802399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry to ask you again but at the moment of impement it in the structure of my QV it is not working. (I have to follow this structure becose many things depend from this, old qlikview file that someone did a long time ago and no one understands).&lt;/P&gt;&lt;P&gt;Thanks for the help ^^&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/message/1388943"&gt;Aggr and variables&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Nov 2017 16:20:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Agreggation-and-set-analysis-with-parameters/m-p/1451409#M802399</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-24T16:20:12Z</dc:date>
    </item>
  </channel>
</rss>

