<?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 in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average/m-p/2699611#M81634</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Could you please try the below whether it provides the result that you want?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Average =
AVERAGEX (
    FILTER (
        ADDCOLUMNS (
            VALUES ( 'DataTable'[Name] ),
            "@ERecsperhour", CALCULATE ( SUM ( 'DataTable'[E-Recs per Hour] ) )
        ),
        [@ERecsperhour] &amp;lt;&amp;gt; 0
    ),
    [@ERecsperhour]
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Aug 2022 03:16:09 GMT</pubDate>
    <dc:creator>Jihwan_Kim</dc:creator>
    <dc:date>2022-08-15T03:16:09Z</dc:date>
    <item>
      <title>Average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average/m-p/2699447#M81625</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;This works with a single month selected, but not with multiple months.&amp;nbsp; Trying to show the average of what shows in the visual, and then color format the column background.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://1drv.ms/u/s!AgCd7AyfqZtE4ULKf-YWPLPAByoA" target="_self"&gt;This is my pbix&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Nathaniel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Aug 2022 23:24:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average/m-p/2699447#M81625</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2022-08-14T23:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: Average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average/m-p/2699611#M81634</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Could you please try the below whether it provides the result that you want?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Average =
AVERAGEX (
    FILTER (
        ADDCOLUMNS (
            VALUES ( 'DataTable'[Name] ),
            "@ERecsperhour", CALCULATE ( SUM ( 'DataTable'[E-Recs per Hour] ) )
        ),
        [@ERecsperhour] &amp;lt;&amp;gt; 0
    ),
    [@ERecsperhour]
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 03:16:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average/m-p/2699611#M81634</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-08-15T03:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: Average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average/m-p/2699634#M81637</link>
      <description>&lt;LI-CODE lang="markup"&gt;Average = AVERAGE('DataTable'[E-Recs per Hour])
= AVERAGEX('DataTable', 'DataTable'[E-Recs per Hour])&lt;/LI-CODE&gt;
&lt;P&gt;the calculation of average is based on the rows of 'DataTable' in the current filter context; it has nothing to do with the calculation in the table viz.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;AVG = 
VAR __n = VALUES( 'DataTable'[Name] )
RETURN
    SUMX( __n, CALCULATE( SUM( 'DataTable'[E-Recs per Hour] ) ) )
        / COUNTROWS( __n )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 03:31:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average/m-p/2699634#M81637</guid>
      <dc:creator>CNENFRNL</dc:creator>
      <dc:date>2022-08-15T03:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: Average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average/m-p/2699689#M81645</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="159166" data-lia-user-login="Nathaniel_C" class="lia-mention lia-mention-user"&gt;Nathaniel_C&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Here is the sample file with the solutoion&amp;nbsp;&lt;A href="https://www.dropbox.com/t/M7zX39R3UdSCO9SR" target="_blank"&gt;https://www.dropbox.com/t/M7zX39R3UdSCO9SR&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You want to calculate the average of the sum. The row level average won't help. Can follow this&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Average New = 
AVERAGEX ( 
    VALUES ( 'DataTable'[Name] ),
    CALCULATE ( SUM ( 'DataTable'[E-Recs per Hour] ) )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 15 Aug 2022 05:13:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average/m-p/2699689#M81645</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-08-15T05:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: Average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average/m-p/2714354#M82596</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="250150" data-lia-user-login="CNENFRNL" class="lia-mention lia-mention-user"&gt;CNENFRNL&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Thank you all,&lt;/P&gt;
&lt;P&gt;Three different solutions, that all work!&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Nathaniel&lt;/P&gt;</description>
      <pubDate>Sat, 20 Aug 2022 23:11:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average/m-p/2714354#M82596</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2022-08-20T23:11:25Z</dc:date>
    </item>
  </channel>
</rss>

