<?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: Creating a Dimension from an aggregate value. in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Creating-a-Dimension-from-an-aggregate-value/m-p/1563261#M62935</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I think you just need to use the AGGR function with it, and aggregate at whatever level you're looking for.&lt;/P&gt;&lt;P&gt;For example, aggregated at the CaseNbr level:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;AGGR(&lt;BR /&gt;IF(MAX(CaseAgingDaysByMonth) &amp;lt;=14, Dual('0-14', 1),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If(MAX(CaseAgingDaysByMonth) &amp;gt; 14 and MAX(CaseAgingDaysByMonth) &amp;lt;= 21, Dual('15-21', 2),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If(MAX(CaseAgingDaysByMonth) &amp;gt; 21 and MAX(CaseAgingDaysByMonth) &amp;lt;= 28, Dual('22-28', 3),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If(MAX(CaseAgingDaysByMonth) &amp;gt; 28, Dual('29+', 4)))))&lt;BR /&gt;,CaseNbr)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Also, consider whether you could calculate this in the load script instead.&lt;/P&gt;</description>
    <pubDate>Mon, 01 Apr 2019 05:17:55 GMT</pubDate>
    <dc:creator>rachel_delany</dc:creator>
    <dc:date>2019-04-01T05:17:55Z</dc:date>
    <item>
      <title>Creating a Dimension from an aggregate value.</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-a-Dimension-from-an-aggregate-value/m-p/1563084#M62934</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a dimension from this.&amp;nbsp; I get an error when I use it as a dimension but it displays if I use the following as a measure.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF(MAX(CaseAgingDaysByMonth) &amp;lt;=14, Dual('0-14', 1),&lt;BR /&gt;If(MAX(CaseAgingDaysByMonth) &amp;gt; 14 and MAX(CaseAgingDaysByMonth) &amp;lt;= 21, Dual('15-21', 2),&lt;BR /&gt;If(MAX(CaseAgingDaysByMonth) &amp;gt; 21 and MAX(CaseAgingDaysByMonth) &amp;lt;= 28, Dual('22-28', 3),&lt;BR /&gt;If(MAX(CaseAgingDaysByMonth) &amp;gt; 28, Dual('29+', 4)))))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I need to do is get the max aging by date and assign that to "buckets" - Categorize them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reason for max is because I want to determine how old something is based on the month end that a use selects.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample -&amp;nbsp; Case Aging Buckets is what I want as a dimension.&amp;nbsp; It only works as a measure for some reason.&amp;nbsp; I need this to be a dimension so I can use in a bar chart.&amp;nbsp; If the user selects MonthEndDate of 2014-11-30 then the aging buckets should be &lt;STRONG&gt;15-21&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 973px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/9148iD9DD6BE9F67961F4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 07:52:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-a-Dimension-from-an-aggregate-value/m-p/1563084#M62934</guid>
      <dc:creator>david_smee</dc:creator>
      <dc:date>2021-04-02T07:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Dimension from an aggregate value.</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-a-Dimension-from-an-aggregate-value/m-p/1563261#M62935</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I think you just need to use the AGGR function with it, and aggregate at whatever level you're looking for.&lt;/P&gt;&lt;P&gt;For example, aggregated at the CaseNbr level:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;AGGR(&lt;BR /&gt;IF(MAX(CaseAgingDaysByMonth) &amp;lt;=14, Dual('0-14', 1),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If(MAX(CaseAgingDaysByMonth) &amp;gt; 14 and MAX(CaseAgingDaysByMonth) &amp;lt;= 21, Dual('15-21', 2),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If(MAX(CaseAgingDaysByMonth) &amp;gt; 21 and MAX(CaseAgingDaysByMonth) &amp;lt;= 28, Dual('22-28', 3),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If(MAX(CaseAgingDaysByMonth) &amp;gt; 28, Dual('29+', 4)))))&lt;BR /&gt;,CaseNbr)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Also, consider whether you could calculate this in the load script instead.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 05:17:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-a-Dimension-from-an-aggregate-value/m-p/1563261#M62935</guid>
      <dc:creator>rachel_delany</dc:creator>
      <dc:date>2019-04-01T05:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Dimension from an aggregate value.</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-a-Dimension-from-an-aggregate-value/m-p/1567301#M62936</link>
      <description>&lt;P&gt;I agree with&amp;nbsp;&lt;SPAN class=""&gt;&lt;A href="https://community.qlik.com/t5/user/viewprofilepage/user-id/30885" target="_self"&gt;Rachel_delany&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;You need to wrap your measure in AGGR.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;Additionally I suggest making use of the &lt;A href="https://help.qlik.com/en-US/sense/February2019/Subsystems/Hub/Content/Sense_Hub/Scripting/ConditionalFunctions/class.htm" target="_blank" rel="noopener"&gt;CLASS&lt;/A&gt; function to create your buckets/bins.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Try the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;AGGR(
    CLASS(MAX(CaseAgingDaysByMonth), 7),
    CaseNbr, MonthEndDate
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This might also help:&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/Buckets/ba-p/1463216" target="_blank" rel="noopener"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/Buckets/ba-p/1463216&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2019 05:23:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-a-Dimension-from-an-aggregate-value/m-p/1567301#M62936</guid>
      <dc:creator>MynhardtBurger</dc:creator>
      <dc:date>2019-04-10T05:23:29Z</dc:date>
    </item>
  </channel>
</rss>

