<?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 dimension using rank and concat in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Calculated-dimension-using-rank-and-concat/m-p/1250684#M25172</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tanya,&lt;/P&gt;&lt;P&gt;it could be&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;Concat&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;id&lt;/SPAN&gt;={&lt;SPAN style="color: #800000;"&gt;"=Rank(id)&amp;lt;=2"&lt;/SPAN&gt;}&amp;gt;} &lt;SPAN style="color: #800000;"&gt;location&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,'|') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;but You can't use in calculated dimension.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Antonio&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Nov 2016 10:02:23 GMT</pubDate>
    <dc:creator>antoniotiman</dc:creator>
    <dc:date>2016-11-15T10:02:23Z</dc:date>
    <item>
      <title>Calculated dimension using rank and concat</title>
      <link>https://community.qlik.com/t5/App-Development/Calculated-dimension-using-rank-and-concat/m-p/1250683#M25171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a follow up to &lt;A href="https://community.qlik.com/message/1157775"&gt;Variable expansion, quotes and equal sign&lt;/A&gt;‌. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my data:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;LOAD * INLINE [&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; location, id&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; siteA, 1&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; siteB, 2&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; siteC, 3&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; siteD, 4&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;];&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;If I want a dimension that is a list of all locations, I can either define it in the dimension: &lt;STRONG&gt;='$(=Concat(location, ', '))'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Or I can create a variable &lt;STRONG&gt;SET vTest= =Concat(location, ', ')&lt;/STRONG&gt; and the dimension defined as &lt;STRONG&gt;=vTest&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I want to limit how many locations I see to the top two. I know that I can use rank to limit my set like this: &lt;STRONG&gt;=if(aggr(rank(min(id)),location)&amp;lt;=2,location) &lt;/STRONG&gt;, but I can't seem to find a way to combine this with Concat to use in a calculated dimension&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result I'm looking for is &lt;STRONG&gt;siteC, siteD&lt;/STRONG&gt;. (Order is not important)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, is there a way to do this using set expression instead of if statement? My real data is very large and I expect performance will be an issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tanya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2016 09:46:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculated-dimension-using-rank-and-concat/m-p/1250683#M25171</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-15T09:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated dimension using rank and concat</title>
      <link>https://community.qlik.com/t5/App-Development/Calculated-dimension-using-rank-and-concat/m-p/1250684#M25172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tanya,&lt;/P&gt;&lt;P&gt;it could be&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;Concat&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;id&lt;/SPAN&gt;={&lt;SPAN style="color: #800000;"&gt;"=Rank(id)&amp;lt;=2"&lt;/SPAN&gt;}&amp;gt;} &lt;SPAN style="color: #800000;"&gt;location&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,'|') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;but You can't use in calculated dimension.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Antonio&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2016 10:02:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculated-dimension-using-rank-and-concat/m-p/1250684#M25172</guid>
      <dc:creator>antoniotiman</dc:creator>
      <dc:date>2016-11-15T10:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated dimension using rank and concat</title>
      <link>https://community.qlik.com/t5/App-Development/Calculated-dimension-using-rank-and-concat/m-p/1250685#M25173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps like this: =Concat({&amp;lt;location={"=rank(min(id))&amp;lt;=2"}&amp;gt;}location, ', ')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2016 10:04:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculated-dimension-using-rank-and-concat/m-p/1250685#M25173</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-11-15T10:04:12Z</dc:date>
    </item>
  </channel>
</rss>

