<?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 Aggr Dimension with Pick in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Aggr-Dimension-with-Pick/m-p/1546589#M39347</link>
    <description>&lt;P&gt;Hello I have a bar chart with an aggr dimension to capture the top 15 states by the sum of a value.&amp;nbsp; I would like the top 15 to flex based on the value of a selected variable.&amp;nbsp; In my sheet i have a variable that allows the user to select a measure and the chart flexes to that measure.&amp;nbsp; I want the aggr to flex to that measure as well.&amp;nbsp; It is as if i need to embed the variable within the aggr but I can't get it to work.&amp;nbsp; Below my screen print I have pasted the set analysis that drives the metrics/visualizations.&amp;nbsp; Any help would be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="1.jpg" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/6358i201152DC8F7FD1A6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="1.jpg" alt="1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here are each of the metrics behind the button/variable.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;pick(vDashboard,&lt;BR /&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=max([Year]))}&amp;gt;}STATUTORY_WRITTEN_PREMIUM*1000), //Written Premium&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=max([Year]))}&amp;gt;}INC_LOSSES*1000), //Incurred Losses&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=max([Year]))}&amp;gt;}COMM_BROK_EXP*1000), //Commission&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=max([Year]))}&amp;gt;}DCC_EXP_INC*1000), //Defense Cost&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=max([Year]))}&amp;gt;}AO_EXP_INC*1000), //Adjusting Expenses&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=max([Year]))}&amp;gt;}TAX_LIC_FEES*1000) //Taxes and Fees&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here's my current aggr function for state:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;=if(aggr(rank(sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=max([Year]))}&amp;gt;}STATUTORY_WRITTEN_PREMIUM)),STATE)&amp;lt;=15,STATE)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I tried this but it didn't work:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;=if(aggr(rank((pick(vDashboard,&lt;BR /&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=Max([Year]))}&amp;gt;}STATUTORY_WRITTEN_PREMIUM*1000), //Written Premium&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=Max([Year]))}&amp;gt;}INC_LOSSES*1000), //Incurred Losses&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=Max([Year]))}&amp;gt;}COMM_BROK_EXP*1000), //Commission&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=Max([Year]))}&amp;gt;}DCC_EXP_INC*1000), //Defense Cost&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=Max([Year]))}&amp;gt;}AO_EXP_INC*1000), //Adjusting Expenses&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=Max([Year]))}&amp;gt;}TAX_LIC_FEES*1000) //Taxes and Fees&lt;/P&gt;&lt;P&gt;))&lt;BR /&gt;,STATE)&amp;lt;=15,STATE)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 21:22:46 GMT</pubDate>
    <dc:creator>carlcimino</dc:creator>
    <dc:date>2024-11-16T21:22:46Z</dc:date>
    <item>
      <title>Aggr Dimension with Pick</title>
      <link>https://community.qlik.com/t5/App-Development/Aggr-Dimension-with-Pick/m-p/1546589#M39347</link>
      <description>&lt;P&gt;Hello I have a bar chart with an aggr dimension to capture the top 15 states by the sum of a value.&amp;nbsp; I would like the top 15 to flex based on the value of a selected variable.&amp;nbsp; In my sheet i have a variable that allows the user to select a measure and the chart flexes to that measure.&amp;nbsp; I want the aggr to flex to that measure as well.&amp;nbsp; It is as if i need to embed the variable within the aggr but I can't get it to work.&amp;nbsp; Below my screen print I have pasted the set analysis that drives the metrics/visualizations.&amp;nbsp; Any help would be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="1.jpg" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/6358i201152DC8F7FD1A6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="1.jpg" alt="1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here are each of the metrics behind the button/variable.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;pick(vDashboard,&lt;BR /&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=max([Year]))}&amp;gt;}STATUTORY_WRITTEN_PREMIUM*1000), //Written Premium&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=max([Year]))}&amp;gt;}INC_LOSSES*1000), //Incurred Losses&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=max([Year]))}&amp;gt;}COMM_BROK_EXP*1000), //Commission&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=max([Year]))}&amp;gt;}DCC_EXP_INC*1000), //Defense Cost&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=max([Year]))}&amp;gt;}AO_EXP_INC*1000), //Adjusting Expenses&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=max([Year]))}&amp;gt;}TAX_LIC_FEES*1000) //Taxes and Fees&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here's my current aggr function for state:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;=if(aggr(rank(sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=max([Year]))}&amp;gt;}STATUTORY_WRITTEN_PREMIUM)),STATE)&amp;lt;=15,STATE)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I tried this but it didn't work:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;=if(aggr(rank((pick(vDashboard,&lt;BR /&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=Max([Year]))}&amp;gt;}STATUTORY_WRITTEN_PREMIUM*1000), //Written Premium&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=Max([Year]))}&amp;gt;}INC_LOSSES*1000), //Incurred Losses&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=Max([Year]))}&amp;gt;}COMM_BROK_EXP*1000), //Commission&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=Max([Year]))}&amp;gt;}DCC_EXP_INC*1000), //Defense Cost&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=Max([Year]))}&amp;gt;}AO_EXP_INC*1000), //Adjusting Expenses&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=Max([Year]))}&amp;gt;}TAX_LIC_FEES*1000) //Taxes and Fees&lt;/P&gt;&lt;P&gt;))&lt;BR /&gt;,STATE)&amp;lt;=15,STATE)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 21:22:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggr-Dimension-with-Pick/m-p/1546589#M39347</guid>
      <dc:creator>carlcimino</dc:creator>
      <dc:date>2024-11-16T21:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr Dimension with Pick</title>
      <link>https://community.qlik.com/t5/App-Development/Aggr-Dimension-with-Pick/m-p/1553882#M39885</link>
      <description>&lt;P&gt;Turns out I was on the right track...&amp;nbsp; A single open parenthesis tripped the whole thing up.&lt;/P&gt;&lt;P&gt;=if(aggr(rank(pick(vDashboard,&lt;BR /&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=Max([Year]))}&amp;gt;}STATUTORY_WRITTEN_PREMIUM*1000)/12, //Written Premium&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=Max([Year]))}&amp;gt;}INC_LOSSES*1000)/12, //Incurred Losses&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=Max([Year]))}&amp;gt;}COMM_BROK_EXP*1000)/12, //Commission&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=Max([Year]))}&amp;gt;}DCC_EXP_INC*1000)/12, //Defense Cost&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=Max([Year]))}&amp;gt;}AO_EXP_INC*1000)/12, //Adjusting Expenses&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DATA_TYPE={STAT}, [Year]={$(=Max([Year]))}&amp;gt;}TAX_LIC_FEES*1000)/12 //Taxes and Fees&lt;/P&gt;&lt;P&gt;)),STATE)&amp;lt;=15,STATE)&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2019 21:18:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggr-Dimension-with-Pick/m-p/1553882#M39885</guid>
      <dc:creator>carlcimino</dc:creator>
      <dc:date>2019-03-07T21:18:26Z</dc:date>
    </item>
  </channel>
</rss>

