<?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: top 5 states in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/top-5-states/m-p/2489079#M101752</link>
    <description>&lt;P&gt;You can reference to the Calulcated measure into another measure. check this for more details:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/New-to-Qlik-Analytics/Referencing-Measures-in-other-Measures/td-p/1447667" target="_blank"&gt;https://community.qlik.com/t5/New-to-Qlik-Analytics/Referencing-Measures-in-other-Measures/td-p/1447667&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Oct 2024 04:46:05 GMT</pubDate>
    <dc:creator>Qrishna</dc:creator>
    <dc:date>2024-10-25T04:46:05Z</dc:date>
    <item>
      <title>top 5 states</title>
      <link>https://community.qlik.com/t5/App-Development/top-5-states/m-p/2488566#M101694</link>
      <description>&lt;P&gt;I have columns for State, Share, and Sales, and I want to get the top 5 states where the Share is greater than zero, ranked by the highest Sales.&lt;/P&gt;
&lt;P&gt;I want the Top 5 States as the dimension.&lt;/P&gt;
&lt;P&gt;I am using below Logic:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;IF(Aggr(Rank(SUM(Sales), 4), State) &amp;lt;= 5 AND SUM(Share) &amp;gt; 0, State)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="519"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="118"&gt;State&lt;/TD&gt;
&lt;TD width="88"&gt;Share&lt;/TD&gt;
&lt;TD width="113"&gt;Sales&lt;/TD&gt;
&lt;TD width="200"&gt;Top 5 State&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt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Telangana&lt;/TD&gt;
&lt;TD&gt;6&lt;/TD&gt;
&lt;TD&gt;16&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Uttar Pradesh&lt;/TD&gt;
&lt;TD&gt;7&lt;/TD&gt;
&lt;TD&gt;24&lt;/TD&gt;
&lt;TD&gt;Uttar Pradesh&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;West Bengal&lt;/TD&gt;
&lt;TD&gt;3&lt;/TD&gt;
&lt;TD&gt;13&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Fri, 15 Nov 2024 20:50:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/top-5-states/m-p/2488566#M101694</guid>
      <dc:creator>sachin1</dc:creator>
      <dc:date>2024-11-15T20:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: top 5 states</title>
      <link>https://community.qlik.com/t5/App-Development/top-5-states/m-p/2488635#M101697</link>
      <description>&lt;P&gt;try with&amp;nbsp;&lt;/P&gt;
&lt;P&gt;=Aggr(&lt;BR /&gt;Only({$&amp;lt;State = {"=Rank(Sum({$&amp;lt;Share={[&amp;gt;0]}&amp;gt;} Sales))&amp;lt;=5"}&amp;gt;} State), &lt;BR /&gt;State)&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 08:50:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/top-5-states/m-p/2488635#M101697</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2024-10-23T08:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: top 5 states</title>
      <link>https://community.qlik.com/t5/App-Development/top-5-states/m-p/2488877#M101727</link>
      <description>&lt;P&gt;I am calculating the "Share" dynamically, this is not a field. how we can incorporate this calculation into set analysis.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Share Calculated Filed logic:&amp;nbsp;&amp;nbsp;(Sum({&amp;lt;Product={'Apple'}&amp;gt;}Current_Year_Sales)&lt;BR /&gt;/&lt;BR /&gt;Sum(Total&amp;lt;State&amp;gt;Current_Year_Sales))&lt;BR /&gt;-&lt;BR /&gt;(Sum({&amp;lt;Product={'Apple'}&amp;gt;}Previous_Year_Sales)&lt;BR /&gt;/&lt;BR /&gt;Sum(Total&amp;lt;State&amp;gt;Previous_Year_Sales))&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2024 06:30:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/top-5-states/m-p/2488877#M101727</guid>
      <dc:creator>sachin1</dc:creator>
      <dc:date>2024-10-24T06:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: top 5 states</title>
      <link>https://community.qlik.com/t5/App-Development/top-5-states/m-p/2489079#M101752</link>
      <description>&lt;P&gt;You can reference to the Calulcated measure into another measure. check this for more details:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/New-to-Qlik-Analytics/Referencing-Measures-in-other-Measures/td-p/1447667" target="_blank"&gt;https://community.qlik.com/t5/New-to-Qlik-Analytics/Referencing-Measures-in-other-Measures/td-p/1447667&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 04:46:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/top-5-states/m-p/2489079#M101752</guid>
      <dc:creator>Qrishna</dc:creator>
      <dc:date>2024-10-25T04:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: top 5 states</title>
      <link>https://community.qlik.com/t5/App-Development/top-5-states/m-p/2489098#M101756</link>
      <description>&lt;P&gt;I have Define the "Share" as a Master Measure:&lt;/P&gt;
&lt;P&gt;(Sum({&amp;lt;Product={'Apple'}&amp;gt;} Current_Year_Sales) / Sum(Total &amp;lt;State&amp;gt; Current_Year_Sales)) -&lt;BR /&gt;(Sum({&amp;lt;Product={'Apple'}&amp;gt;} Previous_Year_Sales) / Sum(Total &amp;lt;State&amp;gt; Previous_Year_Sales))&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;In the master, I have defined the logic and created the "Share" field as a measure. Then, I am using the "Share" field measure in the set analysis, as shown below.&lt;/P&gt;
&lt;P&gt;Aggr(&lt;BR /&gt;Only({$&amp;lt;State = {"=Rank(Sum({$&amp;lt;Share={'&amp;gt;0'}&amp;gt;} Sales))&amp;lt;=5"}&amp;gt;} State),&lt;BR /&gt;State&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;But output is not getting.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 06:30:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/top-5-states/m-p/2489098#M101756</guid>
      <dc:creator>sachin1</dc:creator>
      <dc:date>2024-10-25T06:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: top 5 states</title>
      <link>https://community.qlik.com/t5/App-Development/top-5-states/m-p/2489259#M101776</link>
      <description>&lt;P&gt;Please look into the link i have attached: '&lt;SPAN&gt;- Unfortunately, Master Items cannot be referenced directly in other Master Items. This would be a nice feature, but it's not currently there.&lt;/SPAN&gt;'&lt;/P&gt;
&lt;P&gt;store various formulas in variables and then use the variable in the definition of the Master Items. Multiple variables can be combined in expressions. For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Variables:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; vexp_Sales = 'sum(Sales)'&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; vexp_Cost = 'sum(Cost)'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Master Item Definitions:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Total Sales = $(vexp_Sales)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Total Cost = $(vexp_Cost)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Margin % = (&lt;SPAN&gt;$(vexp_Sales) -&amp;nbsp;$(vexp_Cost)&lt;/SPAN&gt;) /&lt;SPAN&gt;$(vexp_Cost)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 22:22:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/top-5-states/m-p/2489259#M101776</guid>
      <dc:creator>Qrishna</dc:creator>
      <dc:date>2024-10-25T22:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: top 5 states</title>
      <link>https://community.qlik.com/t5/App-Development/top-5-states/m-p/2489355#M101793</link>
      <description>&lt;P&gt;I have tried this still not working.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 06:05:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/top-5-states/m-p/2489355#M101793</guid>
      <dc:creator>sachin1</dc:creator>
      <dc:date>2024-10-28T06:05:06Z</dc:date>
    </item>
  </channel>
</rss>

