<?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: Calculated Dimensions with Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculated-Dimensions-with-Set-Analysis/m-p/811901#M286562</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For calculated dimensions you need (often) to wrap your calculation in a aggr() function - have a look here: &lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2014/04/08/calculated-dimensions" title="http://community.qlik.com/blogs/qlikviewdesignblog/2014/04/08/calculated-dimensions"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2014/04/08/calculated-dimensions&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Nov 2014 12:25:31 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2014-11-25T12:25:31Z</dc:date>
    <item>
      <title>Calculated Dimensions with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimensions-with-Set-Analysis/m-p/811900#M286561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to categorize some clients into either&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Existing - have made a purchase &lt;/LI&gt;&lt;LI&gt;Interested - have not made a purchase but have had an appointment in the last 6 months&lt;/LI&gt;&lt;LI&gt;New - have not made a purchase before and have not had an appointment in the last 6 months&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The complicating factor is that I am only interested in clients that have had a particular type of appointment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I place this expressioin into a chart it gives me the correct results,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I try and put it into a calculated dimension it fails, I can't figure out why, any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14168882051225483" jivemacro_uid="_14168882051225483"&gt;
&lt;P&gt;if(&lt;/P&gt;
&lt;P&gt;//Re Aiding&lt;/P&gt;
&lt;P&gt;MaxString(&lt;/P&gt;
&lt;P&gt;&amp;nbsp; {&amp;lt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; [Client Code] = P({&amp;lt;[Reason Group] = {$(ApptType)},Invoice = {'Sale'}&amp;gt;})&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp; [Client Code]) &amp;gt;0,'Existing',&lt;/P&gt;
&lt;P&gt;if(&lt;/P&gt;
&lt;P&gt;//Second Look&lt;/P&gt;
&lt;P&gt;MaxString(&lt;/P&gt;
&lt;P&gt;&amp;nbsp; {&amp;lt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; [Client Code] = P({&amp;lt;[Reason Group] = {$(ApptType)},CalendarDate = {'&amp;lt;=$(NewClientDate)'}&amp;gt;})&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp; [Client Code]),'Interested',&lt;/P&gt;
&lt;P&gt;if(&lt;/P&gt;
&lt;P&gt;//New Client&lt;/P&gt;
&lt;P&gt;MaxString(&lt;/P&gt;
&lt;P&gt;&amp;nbsp; {&amp;lt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; [Client Code] = P({&amp;lt;[Reason Group] = {$(had ApptType)},CalendarDate = {'&amp;gt;=$(NewClientDate)'}&amp;gt;})&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp; [Client Code]),'New',&lt;/P&gt;
&lt;P&gt;'Unclasified')))&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 04:04:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimensions-with-Set-Analysis/m-p/811900#M286561</guid>
      <dc:creator />
      <dc:date>2014-11-25T04:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimensions with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimensions-with-Set-Analysis/m-p/811901#M286562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For calculated dimensions you need (often) to wrap your calculation in a aggr() function - have a look here: &lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2014/04/08/calculated-dimensions" title="http://community.qlik.com/blogs/qlikviewdesignblog/2014/04/08/calculated-dimensions"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2014/04/08/calculated-dimensions&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 12:25:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimensions-with-Set-Analysis/m-p/811901#M286562</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-11-25T12:25:31Z</dc:date>
    </item>
  </channel>
</rss>

