<?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: Average selling price of the dynamic Top 10 products in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-selling-price-of-the-dynamic-Top-10-products/m-p/1575932#M31455</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="270902" data-lia-user-login="DIACHROMA" class="lia-mention lia-mention-user"&gt;DIACHROMA&lt;/a&gt; , see if one the 4 can help you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Top 10 Rank = CALCULATE([Sales Amount],TOPN(10,allselected(Product[ProductKey]),[Sales Amount],DESC),VALUES(Product[ProductKey]))&lt;/P&gt;
&lt;P&gt;Top 10 Rank = CALCULATE([Sales Amount],TOPN(10,allselected(Product),[Sales Amount],DESC))&lt;/P&gt;
&lt;P&gt;Top 10 Rank = CALCULATE([Sales Amount],TOPN(10,all(Product[ProductKey]),[Sales Amount],DESC),VALUES(Product[ProductKey]))&lt;/P&gt;
&lt;P&gt;Top 10 Rank = CALCULATE([Sales Amount],TOPN(10,all(Product),[Sales Amount],DESC))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Refer video: &lt;A href="https://youtu.be/QIVEFp-QiOk" target="_blank"&gt;https://youtu.be/QIVEFp-QiOk&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For Rank Refer these links&lt;BR /&gt;&lt;A href="https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures" target="_blank"&gt;https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns" target="_blank"&gt;https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale" target="_blank"&gt;https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 31 Dec 2020 04:32:04 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2020-12-31T04:32:04Z</dc:date>
    <item>
      <title>Average selling price of the dynamic Top 10 products</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-selling-price-of-the-dynamic-Top-10-products/m-p/1575439#M31434</link>
      <description>&lt;P&gt;Hi everbody !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been struggling for several hours with a measure to calculate the average selling price of the Top 10 products sold.&lt;BR /&gt;The difficulty: my Top 10 products must change according to the countries selected in the report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I have a Product table with a "Selling Price" column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Initially I had created a calculated column in my Product table to identify the Top Products. The problem is that the ranking does not update dynamically when I select a country in my report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I went on a measure:&lt;BR /&gt;CALCULATE (&lt;BR /&gt;RANKX (ALL ('Product'); [Sales Amount];; DESC; DENSE);&lt;BR /&gt;KEEPFILTERS (Country)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works well, the ranking changes according to the selected countries.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I don't know how I can use the result of this measure in a formula to calculate the average.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tested this but it doesn't work &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CALCULATE (&lt;BR /&gt;AVERAGE ('Product' [SellingPrice]);&lt;BR /&gt;ProductRanking&amp;gt; = 10&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help ? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&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;Pauline&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2020 18:38:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-selling-price-of-the-dynamic-Top-10-products/m-p/1575439#M31434</guid>
      <dc:creator>DIACHROMA</dc:creator>
      <dc:date>2020-12-30T18:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Average selling price of the dynamic Top 10 products</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-selling-price-of-the-dynamic-Top-10-products/m-p/1575515#M31436</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="270902" data-lia-user-login="DIACHROMA" class="lia-mention lia-mention-user"&gt;DIACHROMA&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You create the Average Selling measure as follows:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Avg Selling Price = 
CALCULATE(
    AVERAGE(Products[Selling Price]),
    FILTER( 
        ALLSELECTED(Products[Product]),
        [Rank] &amp;gt;= 10 
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;If my answer was helpful, please click &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;I&gt; to help other members find it useful&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Click on the &lt;STRONG&gt;Thumbs-Up icon &lt;/STRONG&gt;if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://www.excelfort.com" target="_blank" rel="noopener"&gt;&lt;FONT color="blue"&gt;Website&lt;/FONT&gt;&lt;/A&gt; &lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank" rel="noopener"&gt;&lt;FONT color="blue"&gt;YouTube&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp; &lt;A href="https://linkedin.com/in/fowmy" target="_blank" rel="noopener"&gt;&lt;FONT color="blue"&gt;LinkedIn&lt;/FONT&gt;&lt;/A&gt;&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2020 20:26:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-selling-price-of-the-dynamic-Top-10-products/m-p/1575515#M31436</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2020-12-30T20:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: Average selling price of the dynamic Top 10 products</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-selling-price-of-the-dynamic-Top-10-products/m-p/1575576#M31437</link>
      <description>&lt;P&gt;Hi Fowmy,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your answer !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However it doesn't work in my report... &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When I insert the formula into my report it loads for long minutes. Same when I post the report on the Service.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pauline&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2020 21:44:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-selling-price-of-the-dynamic-Top-10-products/m-p/1575576#M31437</guid>
      <dc:creator>DIACHROMA</dc:creator>
      <dc:date>2020-12-30T21:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: Average selling price of the dynamic Top 10 products</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-selling-price-of-the-dynamic-Top-10-products/m-p/1575889#M31450</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="270902" data-lia-user-login="DIACHROMA" class="lia-mention lia-mention-user"&gt;DIACHROMA&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Modify your Rank formula as : &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rank =&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;CALCULATE (&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RANKX (ALL ('Product'[Product]); [Sales Amount];; DESC; DENSE);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this doesn't work then you can share your pbix file with sample data.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can save the file in OneDrive or any other platform and share the link&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;If my answer was helpful, please click &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;I&gt; to help other members find it useful&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Click on the &lt;STRONG&gt;Thumbs-Up icon &lt;/STRONG&gt;if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;A href="https://www.excelfort.com" target="_blank"&gt;&lt;FONT color="blue"&gt;Website&lt;/FONT&gt;&lt;/A&gt; &lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;&lt;FONT color="blue"&gt;YouTube&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp; &lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;&lt;FONT color="blue"&gt;LinkedIn&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Dec 2020 03:32:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-selling-price-of-the-dynamic-Top-10-products/m-p/1575889#M31450</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2020-12-31T03:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: Average selling price of the dynamic Top 10 products</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-selling-price-of-the-dynamic-Top-10-products/m-p/1575932#M31455</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="270902" data-lia-user-login="DIACHROMA" class="lia-mention lia-mention-user"&gt;DIACHROMA&lt;/a&gt; , see if one the 4 can help you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Top 10 Rank = CALCULATE([Sales Amount],TOPN(10,allselected(Product[ProductKey]),[Sales Amount],DESC),VALUES(Product[ProductKey]))&lt;/P&gt;
&lt;P&gt;Top 10 Rank = CALCULATE([Sales Amount],TOPN(10,allselected(Product),[Sales Amount],DESC))&lt;/P&gt;
&lt;P&gt;Top 10 Rank = CALCULATE([Sales Amount],TOPN(10,all(Product[ProductKey]),[Sales Amount],DESC),VALUES(Product[ProductKey]))&lt;/P&gt;
&lt;P&gt;Top 10 Rank = CALCULATE([Sales Amount],TOPN(10,all(Product),[Sales Amount],DESC))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Refer video: &lt;A href="https://youtu.be/QIVEFp-QiOk" target="_blank"&gt;https://youtu.be/QIVEFp-QiOk&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For Rank Refer these links&lt;BR /&gt;&lt;A href="https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures" target="_blank"&gt;https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns" target="_blank"&gt;https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale" target="_blank"&gt;https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Dec 2020 04:32:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-selling-price-of-the-dynamic-Top-10-products/m-p/1575932#M31455</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-12-31T04:32:04Z</dc:date>
    </item>
  </channel>
</rss>

