<?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 Return Dimension based on Lowest Value in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Return-Dimension-based-on-Lowest-Value/m-p/1954465#M78717</link>
    <description>&lt;P&gt;Good morning All,&lt;BR /&gt;&lt;BR /&gt;I'm trying to create the equivalent of a VLOOKUP / INDEX &amp;amp; MATCH in Qlik where the [Manufacturer] &amp;amp;&amp;nbsp;[Vehicle Description] for the Lowest [Rate] is returned&lt;BR /&gt;&lt;BR /&gt;When I hard-code the lowest [Rate] value into the Expression, the app returns the desired result(s) with no errors (expression below)&amp;nbsp;&lt;BR /&gt;&lt;EM&gt;Concat(DISTINCT&amp;nbsp;if([Rate]=&lt;STRONG&gt;(137.56)&lt;/STRONG&gt;, [Manufacturer] &amp;amp; ' ' &amp;amp; [Vehicle Description]),Chr(10))&lt;BR /&gt;&lt;/EM&gt;&lt;SPAN&gt;&lt;BR /&gt;When I only replace the hard-coded rate with &lt;/SPAN&gt;&lt;STRONG style="font-family: inherit;"&gt;Min([Rate])&lt;/STRONG&gt;&lt;SPAN&gt; (expression below)&lt;BR /&gt;&lt;/SPAN&gt;&lt;EM&gt;Concat(DISTINCT&amp;nbsp;if([Rate]=(&lt;STRONG&gt;Min([Rate])&lt;/STRONG&gt;), [Manufacturer] &amp;amp; ' ' &amp;amp; [Vehicle Description]),Chr(10))&lt;BR /&gt;&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;I receive an Error stating '&lt;STRONG&gt;Error in expression: Nested aggregation not allowed&lt;/STRONG&gt;'&lt;BR /&gt;&lt;SPAN&gt;&lt;BR /&gt;I've tried placing &lt;/SPAN&gt;&lt;STRONG style="font-family: inherit;"&gt;Aggr&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;in different parts of the expression which removes the error but then returns no results.&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jul 2022 09:33:04 GMT</pubDate>
    <dc:creator>simoncarts</dc:creator>
    <dc:date>2022-07-12T09:33:04Z</dc:date>
    <item>
      <title>Return Dimension based on Lowest Value</title>
      <link>https://community.qlik.com/t5/App-Development/Return-Dimension-based-on-Lowest-Value/m-p/1954465#M78717</link>
      <description>&lt;P&gt;Good morning All,&lt;BR /&gt;&lt;BR /&gt;I'm trying to create the equivalent of a VLOOKUP / INDEX &amp;amp; MATCH in Qlik where the [Manufacturer] &amp;amp;&amp;nbsp;[Vehicle Description] for the Lowest [Rate] is returned&lt;BR /&gt;&lt;BR /&gt;When I hard-code the lowest [Rate] value into the Expression, the app returns the desired result(s) with no errors (expression below)&amp;nbsp;&lt;BR /&gt;&lt;EM&gt;Concat(DISTINCT&amp;nbsp;if([Rate]=&lt;STRONG&gt;(137.56)&lt;/STRONG&gt;, [Manufacturer] &amp;amp; ' ' &amp;amp; [Vehicle Description]),Chr(10))&lt;BR /&gt;&lt;/EM&gt;&lt;SPAN&gt;&lt;BR /&gt;When I only replace the hard-coded rate with &lt;/SPAN&gt;&lt;STRONG style="font-family: inherit;"&gt;Min([Rate])&lt;/STRONG&gt;&lt;SPAN&gt; (expression below)&lt;BR /&gt;&lt;/SPAN&gt;&lt;EM&gt;Concat(DISTINCT&amp;nbsp;if([Rate]=(&lt;STRONG&gt;Min([Rate])&lt;/STRONG&gt;), [Manufacturer] &amp;amp; ' ' &amp;amp; [Vehicle Description]),Chr(10))&lt;BR /&gt;&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;I receive an Error stating '&lt;STRONG&gt;Error in expression: Nested aggregation not allowed&lt;/STRONG&gt;'&lt;BR /&gt;&lt;SPAN&gt;&lt;BR /&gt;I've tried placing &lt;/SPAN&gt;&lt;STRONG style="font-family: inherit;"&gt;Aggr&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;in different parts of the expression which removes the error but then returns no results.&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 09:33:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Return-Dimension-based-on-Lowest-Value/m-p/1954465#M78717</guid>
      <dc:creator>simoncarts</dc:creator>
      <dc:date>2022-07-12T09:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Return Dimension based on Lowest Value</title>
      <link>https://community.qlik.com/t5/App-Development/Return-Dimension-based-on-Lowest-Value/m-p/1954466#M78718</link>
      <description>&lt;P&gt;Perhaps try using FirstSortedValue() instead?&lt;/P&gt;
&lt;P&gt;You might also be able to get a result using an internal aggr based on the two dimensions in question, assuming each combination is limited to having a single rate. It'd look something like:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Concat(DISTINCT&amp;nbsp;if([Rate]=(Min(aggr(&lt;STRONG&gt;Only([Rate]),Manufacturer,[Vehicle Description]&lt;/STRONG&gt;)), [Manufacturer] &amp;amp; ' ' &amp;amp; [Vehicle Description]),Chr(10))&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 09:38:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Return-Dimension-based-on-Lowest-Value/m-p/1954466#M78718</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-07-12T09:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Return Dimension based on Lowest Value</title>
      <link>https://community.qlik.com/t5/App-Development/Return-Dimension-based-on-Lowest-Value/m-p/1954473#M78720</link>
      <description>Thanks for the quick response!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;FirstSortedValue does work and I'm going to use this as my solution.  How does it behave when you have 2 Rates being equally the lowest? Ideally I'd like the Manufacturer &amp;amp; Vehicle Descriptions listed if there is more than one &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The Expression you've written out still returns the Nested Aggregation error&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 12 Jul 2022 09:47:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Return-Dimension-based-on-Lowest-Value/m-p/1954473#M78720</guid>
      <dc:creator>simoncarts</dc:creator>
      <dc:date>2022-07-12T09:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Return Dimension based on Lowest Value</title>
      <link>https://community.qlik.com/t5/App-Development/Return-Dimension-based-on-Lowest-Value/m-p/1954539#M78724</link>
      <description>&lt;P&gt;Right, the outer min() will still cause the nested aggregation issue. Didn't notice that since I didn't catch the outer concat(). You could try using set analysis instead of the nested if(), something along the lines of:&lt;/P&gt;
&lt;P&gt;concat({&amp;lt; Rate = {"$(=Max(Rate))"} &amp;gt;} &lt;EM&gt;[Manufacturer] &amp;amp; ' ' &amp;amp; [Vehicle Description]),Chr(10))&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 11:13:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Return-Dimension-based-on-Lowest-Value/m-p/1954539#M78724</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-07-12T11:13:41Z</dc:date>
    </item>
  </channel>
</rss>

