<?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: Conditional expression- 2 ifs and aggr in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Conditional-expression-2-ifs-and-aggr/m-p/749037#M1051619</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you provide some sample data please to work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 02 Nov 2014 10:34:55 GMT</pubDate>
    <dc:creator>MK_QSL</dc:creator>
    <dc:date>2014-11-02T10:34:55Z</dc:date>
    <item>
      <title>Conditional expression- 2 ifs and aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-expression-2-ifs-and-aggr/m-p/749036#M1051618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Community, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been struggling with this for quit some time now and I can really use your help.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to perform the following calculation that is based on several ifs and functions. &lt;/P&gt;&lt;P&gt;The granularity of the data is by AspectId and ReviewId and I need to return the AspectName id the bottom 2 conditions apply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1- If the below calculation is smaller than 0.5 than continue to calculation #2&lt;/P&gt;&lt;P&gt;Aggr(&lt;/P&gt;&lt;P&gt;(Sum( &lt;SPAN style="font-size: 13.3333339691162px;"&gt;Aggr&lt;/SPAN&gt;( max( {&amp;lt;PostQuarter= {'20143'}&amp;gt;} Sentiment),AspectId, ReviewId) )&lt;/P&gt;&lt;P&gt;/Count( &lt;SPAN style="font-size: 13.3333339691162px;"&gt;Aggr&lt;/SPAN&gt;( Count(distinct {&amp;lt;PostQuarter= {'20143'}&amp;gt;} AspectId) ,AspectId ,ReviewId) ))&lt;/P&gt;&lt;P&gt;,[Aspect Name])&amp;lt;0.5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2- Return the AspectName when Rank = 1&lt;/P&gt;&lt;P&gt;rank( &lt;SPAN style="font-size: 13.3333339691162px;"&gt;Aggr&lt;/SPAN&gt;( Count( &lt;SPAN style="font-size: 13.3333339691162px;"&gt;Aggr&lt;/SPAN&gt;(Count(distinct {&amp;lt;PostQuarter= {'20143'}&amp;gt;} AspectId) ,AspectId ,ReviewId) ),[Aspect Name]))=1,[Aspect Name]) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;-Hila.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Nov 2014 08:30:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-expression-2-ifs-and-aggr/m-p/749036#M1051618</guid>
      <dc:creator />
      <dc:date>2014-11-02T08:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional expression- 2 ifs and aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-expression-2-ifs-and-aggr/m-p/749037#M1051619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you provide some sample data please to work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Nov 2014 10:34:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-expression-2-ifs-and-aggr/m-p/749037#M1051619</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-11-02T10:34:55Z</dc:date>
    </item>
  </channel>
</rss>

