<?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 3 HIGHEST in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGE-3-HIGHEST/m-p/2061215#M46517</link>
    <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One tip when removing filters of month name when calculating TOPN ( or RANKX): you also have to remove filters of the month-sorting column as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/s/xgf8cztetxl562t/Sample.pbix?dl=0" target="_self"&gt;Link to the pbix file&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Sep 2021 07:50:12 GMT</pubDate>
    <dc:creator>Jihwan_Kim</dc:creator>
    <dc:date>2021-09-07T07:50:12Z</dc:date>
    <item>
      <title>AVERAGE 3 HIGHEST</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGE-3-HIGHEST/m-p/2059969#M46464</link>
      <description>&lt;P&gt;Hello!&lt;BR /&gt;I need to &lt;STRONG&gt;find and select the 3 highest values&lt;/STRONG&gt; of each row (amount of products per month) from the table and &lt;STRONG&gt;calculate the average&lt;/STRONG&gt;.&lt;BR /&gt;How could I do this by creating a measure using DAX?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Sep 2021 14:18:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGE-3-HIGHEST/m-p/2059969#M46464</guid>
      <dc:creator>stericontrol</dc:creator>
      <dc:date>2021-09-06T14:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: AVERAGE 3 HIGHEST</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGE-3-HIGHEST/m-p/2060786#M46496</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="324348" data-lia-user-login="stericontrol" class="lia-mention lia-mention-user"&gt;stericontrol&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It'd be better if you share a sample of your data here.&lt;/P&gt;&lt;P&gt;BTW, try this measure:&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Top 3 Average = 
AVERAGEX (
    FILTER (
        SUMMARIZE (
            'Table',
            'Table'[Product],
            'Table'[Value],
            "Rank",
                RANKX (
                    ALLEXCEPT ( 'Table', 'Table'[Product] ),
                    CALCULATE ( MAX ( 'Table'[Value] ) ),
                    ,
                    DESC,
                    DENSE
                )
        ),
        [Rank] &amp;lt;= 3
    ),
    [Value]
)&lt;/LI-CODE&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica"&gt;&lt;SPAN&gt;Download Link:&lt;A href="https://gofile.io/d/4F5FfN" target="_blank"&gt;https://gofile.io/d/4F5FfN&lt;/A&gt;&lt;/SPAN&gt;&lt;/FONT&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;&lt;FONT face="helvetica"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;SPAN&gt;, please consider&amp;nbsp;&lt;STRONG&gt;accepting&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;it as the solution&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Appreciate your Kudos&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":victory_hand:"&gt;✌️&lt;/span&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face="helvetica"&gt;&lt;SPAN&gt;!!&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 04:11:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGE-3-HIGHEST/m-p/2060786#M46496</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2021-09-07T04:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: AVERAGE 3 HIGHEST</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGE-3-HIGHEST/m-p/2060809#M46497</link>
      <description>&lt;P&gt;NewMeasure=AVERAGEX(TOPN(3,ALL(DateTable[YearMonth]),[Total]),[Total])&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 04:40:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGE-3-HIGHEST/m-p/2060809#M46497</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2021-09-07T04:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: AVERAGE 3 HIGHEST</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGE-3-HIGHEST/m-p/2061215#M46517</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One tip when removing filters of month name when calculating TOPN ( or RANKX): you also have to remove filters of the month-sorting column as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/s/xgf8cztetxl562t/Sample.pbix?dl=0" target="_self"&gt;Link to the pbix file&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 07:50:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGE-3-HIGHEST/m-p/2061215#M46517</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2021-09-07T07:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: AVERAGE 3 HIGHEST</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGE-3-HIGHEST/m-p/2065091#M46661</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="315278" data-lia-user-login="VahidDM" class="lia-mention lia-mention-user"&gt;VahidDM&lt;/a&gt;&amp;nbsp;, thanks for you reply!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Your model looks great, that's exactly it! I tried to replicate in my base and there were some inconsistencies, I believe due to the complexity compared to your example.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have data from 2016 so far, this was a complicating factor, they are also divided into other tables:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PBI_fSales - Fact Table - Sales&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;"Invoice ID"&lt;BR /&gt;"Product ID"&lt;BR /&gt;"Quantity of sold products"&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PBI_dProdutos - Dimension Table - Products&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;"Product ID"&lt;BR /&gt;"Short Description (name)"&lt;BR /&gt;"Group"&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BPI_dCalendar - Dimension Table - Dates&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;(Year, Month, day)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have a ready-made measure that sums up all sales, called "&lt;STRONG&gt;Total Quantity&lt;/STRONG&gt;".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to calculate the average of the TOP 3 products considering in context the year that is being filtered,&amp;nbsp;your model calculates exactly as I need it, but I believe the date context when I tried to replicate in my database conflicted&amp;nbsp;because the same product appears in years / months of other periods totaled and maybe this confuses the ranking&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new to PBI so forgive some nonsense&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 20:13:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGE-3-HIGHEST/m-p/2065091#M46661</guid>
      <dc:creator>stericontrol</dc:creator>
      <dc:date>2021-09-08T20:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: AVERAGE 3 HIGHEST</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGE-3-HIGHEST/m-p/2625726#M76640</link>
      <description>&lt;P&gt;Hello Vahid!&lt;BR /&gt;&lt;BR /&gt;What about if I do want to Avoid filters ?&lt;BR /&gt;&lt;BR /&gt;I mean, if I do add an slicer and filter by product, to not affect average.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 16:01:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGE-3-HIGHEST/m-p/2625726#M76640</guid>
      <dc:creator>MGaribay</dc:creator>
      <dc:date>2022-07-07T16:01:10Z</dc:date>
    </item>
  </channel>
</rss>

