<?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: Problem with correl expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-correl-expression/m-p/855779#M299952</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;{$&amp;lt;&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; [Year]={$(HighestYear)},&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; MainQuestion ={"&amp;gt;=$(=0)"}&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;gt;} &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;MainQuestion&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This is not an expression. You probably have to add an aggregation function and use the aggr function. Perhaps you need something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correl(aggr(only({$&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; [Year]={$(HighestYear)},&lt;/P&gt;&lt;P&gt;&amp;nbsp; MainQuestion ={"&amp;gt;=$(=0)"}&lt;/P&gt;&lt;P&gt;&amp;gt;} MainQuestion), MyDimension1, MyDimension2, ... , MyDimensionX)&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;aggr(only({$&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; [Year]={$(HighestYear)},&lt;/P&gt;&lt;P&gt;&amp;nbsp; [question]={'Otherquestion'},&lt;/P&gt;&lt;P&gt;&amp;nbsp; score={"&amp;gt;=$(=0)"}&lt;/P&gt;&lt;P&gt;&amp;gt;} score), MyDimension1, MyDimension2, ... , MyDimensionX))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replace&lt;SPAN style="font-size: 13.3333330154419px;"&gt; &lt;EM&gt;MyDimension1, MyDimension2, ... , MyDimensionX&lt;/EM&gt; with the dimensions over which you want to aggregate.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 May 2015 07:59:00 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2015-05-01T07:59:00Z</dc:date>
    <item>
      <title>Problem with correl expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-correl-expression/m-p/855778#M299951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why is this expression wrong ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correl(({$&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; [Year]={$(HighestYear)},&lt;/P&gt;&lt;P&gt;&amp;nbsp; MainQuestion ={"&amp;gt;=$(=0)"}&lt;/P&gt;&lt;P&gt;&amp;gt;} &lt;SPAN style="font-size: 13.3333330154419px;"&gt;MainQuestion&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;({$&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; [&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Year&lt;/SPAN&gt;]={$(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;HighestYear&lt;/SPAN&gt;)},&lt;/P&gt;&lt;P&gt;&amp;nbsp; [question]={'Otherquestion'},&lt;/P&gt;&lt;P&gt;&amp;nbsp; score={"&amp;gt;=$(=0)"}&lt;/P&gt;&lt;P&gt;&amp;gt;} score))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I seperate the expression in the part before the comma and after the comma and use it with avg both expressions are correct :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;avg ({$&amp;lt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; [Year]={$(HighestYear)},&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; MainQuestion ={"&amp;gt;=$(=0)"}&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;gt;} &lt;SPAN style="font-size: 13.3333330154419px;"&gt;MainQuestion&lt;/SPAN&gt;)&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;and&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;avg ({$&amp;lt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; [&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Year&lt;/SPAN&gt;]={$(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;HighestYear&lt;/SPAN&gt;)},&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; [question]={'Otherquestion'},&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; score={"&amp;gt;=$(=0)"}&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;gt;} score)&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Your help will be appreciated &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 08:55:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-correl-expression/m-p/855778#M299951</guid>
      <dc:creator>curiousfellow</dc:creator>
      <dc:date>2015-04-30T08:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with correl expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-correl-expression/m-p/855779#M299952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;{$&amp;lt;&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; [Year]={$(HighestYear)},&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; MainQuestion ={"&amp;gt;=$(=0)"}&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;gt;} &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;MainQuestion&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This is not an expression. You probably have to add an aggregation function and use the aggr function. Perhaps you need something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correl(aggr(only({$&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; [Year]={$(HighestYear)},&lt;/P&gt;&lt;P&gt;&amp;nbsp; MainQuestion ={"&amp;gt;=$(=0)"}&lt;/P&gt;&lt;P&gt;&amp;gt;} MainQuestion), MyDimension1, MyDimension2, ... , MyDimensionX)&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;aggr(only({$&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; [Year]={$(HighestYear)},&lt;/P&gt;&lt;P&gt;&amp;nbsp; [question]={'Otherquestion'},&lt;/P&gt;&lt;P&gt;&amp;nbsp; score={"&amp;gt;=$(=0)"}&lt;/P&gt;&lt;P&gt;&amp;gt;} score), MyDimension1, MyDimension2, ... , MyDimensionX))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replace&lt;SPAN style="font-size: 13.3333330154419px;"&gt; &lt;EM&gt;MyDimension1, MyDimension2, ... , MyDimensionX&lt;/EM&gt; with the dimensions over which you want to aggregate.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 May 2015 07:59:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-correl-expression/m-p/855779#M299952</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-05-01T07:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with correl expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-correl-expression/m-p/855780#M299953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am really new to Qlikview, and was just studying the aggr function.&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/laugh.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that it is not an expression, in my expression it is the first part of the correl expression.&lt;/P&gt;&lt;P&gt;Could you please explain why you use so much dimensions in the first part of the correl expression.&lt;/P&gt;&lt;P&gt;When I simplify the correl expression it looks like &lt;/P&gt;&lt;P&gt;Correl(question1,question2)&lt;/P&gt;&lt;P&gt;However I want a value for &lt;/P&gt;&lt;P&gt;Correl(question1,question2) and&lt;/P&gt;&lt;P&gt;Correl(question1,question3) and&lt;/P&gt;&lt;P&gt;Correl(question1,question4) etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the correl values to be presented in a scatter chart, the average of every question has to be the dimension, the correl is the expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer, I certainly will try your expresion&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 May 2015 08:31:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-correl-expression/m-p/855780#M299953</guid>
      <dc:creator>curiousfellow</dc:creator>
      <dc:date>2015-05-01T08:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with correl expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-correl-expression/m-p/855781#M299954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found a solution for this particular problem, looks like this :&lt;/P&gt;&lt;P&gt;Correl(if(Year=Highestyear,if(Mainquestion &amp;gt; 0,Mainquestion)),if(year=Highestyear,if(Mainquestion &amp;gt; 0,if(score &amp;gt; 0,score))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Probably not the best solution, but works for now &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 May 2015 11:49:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-correl-expression/m-p/855781#M299954</guid>
      <dc:creator>curiousfellow</dc:creator>
      <dc:date>2015-05-01T11:49:33Z</dc:date>
    </item>
  </channel>
</rss>

