<?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: $-sign Calculated Dimension syntax with condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/sign-Calculated-Dimension-syntax-with-condition/m-p/683861#M247904</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you explain what &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Aggr( Concat (IF...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;is actually doing, as I wrote in the precedent post ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Thanks in advance&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Jul 2014 09:17:19 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-07-16T09:17:19Z</dc:date>
    <item>
      <title>$-sign Calculated Dimension syntax with condition</title>
      <link>https://community.qlik.com/t5/QlikView/sign-Calculated-Dimension-syntax-with-condition/m-p/683852#M247895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a pivot-table with one calculated dimension of this form&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Aggr( Concat(IF([Product Type]= 'Sales',IF(MasterCodeDesc = 'BASE', IF(Year&amp;gt;2009,Year))),','), &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF([Corporate Account]='OTHER',[Sales Account],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(=pick(1+match('[Corporate Account]',...,...,...),...,...,...,...))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I test alone the field on which i aggregate, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF([Corporate Account]='OTHER',[Sales Account],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(=pick(1+match('[Corporate Account]',...,...,...),...,...,...,...)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the right computation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Aggr( Concat(IF([Product Type]= 'Sales',IF(MasterCodeDesc = 'BASE', IF(Year&amp;gt;2009,Year))),','), &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF([Corporate Account]='OTHER',[Sales Account],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(=pick(1+match('[Corporate Account]',...,...,...),...,...,...,...))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gives Null() for all rows. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the contrary, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Aggr( Concat(IF([Product Type]= 'Sales',IF(MasterCodeDesc = 'BASE', IF(Year&amp;gt;2009,Year))),','), &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(=IF([Corporate Account]='OTHER',[Sales Account],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pick(1+match('[Corporate Account]',...,...,...),...,...,...,...))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gives some results, but result is wrong: it is as if the IF in the condition in the $-sign expansion was never hit, whereas there are cases where Corporate Account is 'OTHER'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you have a hint ? How to fix this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2014 07:11:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sign-Calculated-Dimension-syntax-with-condition/m-p/683852#M247895</guid>
      <dc:creator />
      <dc:date>2014-07-16T07:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: $-sign Calculated Dimension syntax with condition</title>
      <link>https://community.qlik.com/t5/QlikView/sign-Calculated-Dimension-syntax-with-condition/m-p/683853#M247896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The $-expansion is made on a global level; before the chart is expanded, i.e. &lt;EM&gt;&lt;STRONG&gt;not&lt;/STRONG&gt;&lt;/EM&gt; once per record. This means that &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;$(=IF([Corporate Account]='OTHER', ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;isn't evaluated the way you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bottom line is that you cannot use $-expansions this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2014 07:21:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sign-Calculated-Dimension-syntax-with-condition/m-p/683853#M247896</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-07-16T07:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: $-sign Calculated Dimension syntax with condition</title>
      <link>https://community.qlik.com/t5/QlikView/sign-Calculated-Dimension-syntax-with-condition/m-p/683854#M247897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks a lot&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but what about &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=Aggr( Concat(IF([Product Type]= 'Sales',IF(MasterCodeDesc = 'BASE', IF(Year&amp;gt;2009,Year))),','),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;IF([Corporate Account]='OTHER',[Sales Account],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;$(=pick(1+match('[Corporate Account]',...,...,...),...,...,...,...))))&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;? should be accurate, and indeed the $(=) can here be evaluated globally&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2014 07:25:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sign-Calculated-Dimension-syntax-with-condition/m-p/683854#M247897</guid>
      <dc:creator />
      <dc:date>2014-07-16T07:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: $-sign Calculated Dimension syntax with condition</title>
      <link>https://community.qlik.com/t5/QlikView/sign-Calculated-Dimension-syntax-with-condition/m-p/683855#M247898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it that generally speaking the field upon which aggregation is made in AGGR() is evaluated globally, and not by rows?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2014 07:28:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sign-Calculated-Dimension-syntax-with-condition/m-p/683855#M247898</guid>
      <dc:creator />
      <dc:date>2014-07-16T07:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: $-sign Calculated Dimension syntax with condition</title>
      <link>https://community.qlik.com/t5/QlikView/sign-Calculated-Dimension-syntax-with-condition/m-p/683856#M247899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aggr is a normal function and will be evaluted by row and how &lt;A href="https://community.qlik.com/qlik-users/4003"&gt;Henric Cronström&lt;/A&gt; hint is $(=Expression) a variables which are always global - therefore try to simplify your approaches, perhaps with additionally flag-fields within the script or use &lt;A href="https://community.qlik.com/thread/125721"&gt;Refer to Another Dimension in a Dimension in Pivot Table&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>Wed, 16 Jul 2014 07:54:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sign-Calculated-Dimension-syntax-with-condition/m-p/683856#M247899</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-07-16T07:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: $-sign Calculated Dimension syntax with condition</title>
      <link>https://community.qlik.com/t5/QlikView/sign-Calculated-Dimension-syntax-with-condition/m-p/683857#M247900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Aggr() is not normal function. It is more like a For-Next loop, that creates an array of values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first parameter of the Aggr() function will be evaluated per distinct value of the second (and third) parameter. Hence, the first parameter &lt;STRONG&gt;&lt;EM style="text-decoration: underline;"&gt;must&lt;/EM&gt;&lt;/STRONG&gt; be an aggregation function (e.g.Sum(), Count(), Min(), Max(), Concat(), ...).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Aggr( Count(distinct OrderID), CustomerID )&lt;/P&gt;&lt;P&gt;will create a dimension with the the number of orders per customer: 0, 1, 2, 3, etc. The count function will be evaluated once per customer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See more on &lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2014/05/19/function-classes"&gt;Aggregations and Function Classes&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2014 08:52:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sign-Calculated-Dimension-syntax-with-condition/m-p/683857#M247900</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-07-16T08:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: $-sign Calculated Dimension syntax with condition</title>
      <link>https://community.qlik.com/t5/QlikView/sign-Calculated-Dimension-syntax-with-condition/m-p/683858#M247901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What about this: I am aggregation concat(), which sounds reasonable. But I am appending the 'Year' only under some conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aggr( Concat( IF([Product Type]= 'Sales', IF(MasterCodeDesc = 'BASE', IF(Year&amp;gt;2009,Year,'None'),'None'),'None'),','), &lt;/P&gt;&lt;P&gt;$(=pick(1+match(...,...,...),...,...,...)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is however not working. is the syntax correct? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2014 08:56:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sign-Calculated-Dimension-syntax-with-condition/m-p/683858#M247901</guid>
      <dc:creator />
      <dc:date>2014-07-16T08:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: $-sign Calculated Dimension syntax with condition</title>
      <link>https://community.qlik.com/t5/QlikView/sign-Calculated-Dimension-syntax-with-condition/m-p/683859#M247902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is again $(=pick(1+match(...,...,...),...,...,...)) which wouldn't probably return a valid Field(list) and if it did then it is the same for all rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2014 09:02:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sign-Calculated-Dimension-syntax-with-condition/m-p/683859#M247902</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-07-16T09:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: $-sign Calculated Dimension syntax with condition</title>
      <link>https://community.qlik.com/t5/QlikView/sign-Calculated-Dimension-syntax-with-condition/m-p/683860#M247903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but, I tested separately as another calculated dimension&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=IF([Corporate Account]='OTHER',[Sales Account],$(=pick(1+match('[Corporate Account]',...,...),...,...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this is working fine...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so it seems to me that the $(=) is evaluated correctly...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2014 09:05:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sign-Calculated-Dimension-syntax-with-condition/m-p/683860#M247903</guid>
      <dc:creator />
      <dc:date>2014-07-16T09:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: $-sign Calculated Dimension syntax with condition</title>
      <link>https://community.qlik.com/t5/QlikView/sign-Calculated-Dimension-syntax-with-condition/m-p/683861#M247904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you explain what &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Aggr( Concat (IF...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;is actually doing, as I wrote in the precedent post ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Thanks in advance&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2014 09:17:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sign-Calculated-Dimension-syntax-with-condition/m-p/683861#M247904</guid>
      <dc:creator />
      <dc:date>2014-07-16T09:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: $-sign Calculated Dimension syntax with condition</title>
      <link>https://community.qlik.com/t5/QlikView/sign-Calculated-Dimension-syntax-with-condition/m-p/683862#M247905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That an expression could be interpreted as calculated dimension or as single expression didn't meant that these expression returned a valid value as nested part from another expression - such things could work but you couldn't be sure without expensive testings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's not recommended to use such complicated structures within objects - although they may work - then the time exposure for creating, validation and maintance is compared with script-solutions (which simplify calculations and are reusable in other apps and/or objects) often too high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I couldn't imagine what you are want to reach with your pick(match()) if it not returned the dimension-level from the row - for this could be dimensionality() used .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2014 10:11:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sign-Calculated-Dimension-syntax-with-condition/m-p/683862#M247905</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-07-16T10:11:44Z</dc:date>
    </item>
  </channel>
</rss>

