<?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: Calculating Average in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Average/m-p/3344885#M125568</link>
    <description>&lt;P&gt;Please provide your work-in-progress Power BI Desktop file (with sensitive information removed) that covers your issue or question completely in a usable format (not as a screenshot).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This allows members of the Forum to assess the state of the model, report layer, relationships, and any DAX applied.&lt;/P&gt;</description>
    <pubDate>Sat, 22 Jul 2023 17:05:41 GMT</pubDate>
    <dc:creator>foodd</dc:creator>
    <dc:date>2023-07-22T17:05:41Z</dc:date>
    <item>
      <title>Calculating Average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Average/m-p/3344787#M125561</link>
      <description>&lt;P&gt;I need to represent the average per year from the following. The values in the matrix are the Count of Distinct (Name). The dates are (Created Date). It's okay if it requires a separate table visual.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The goal is 2017 to calculate as 185 (sum of distinct names in 2017) divided by 12 (number of months), for example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even better would be if 2023 can limit to only through the previous month. For example, it is July today. I'd want the sum of distinct names through January 2023-June 2023 divided by 6 (months)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jul 2023 14:02:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Average/m-p/3344787#M125561</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-22T14:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Average/m-p/3344820#M125563</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;Try the following DAX Code:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;AveragePerYear =&lt;BR /&gt;VAR CurrentYear = YEAR(MAX('YourTable'[Month]))&lt;BR /&gt;VAR PreviousMonth = IF(MONTH(TODAY()) &amp;gt; 1, MONTH(TODAY()) - 1, 1)&lt;BR /&gt;VAR StartYear = IF(CurrentYear = 2023, 2017, 0)&lt;BR /&gt;VAR EndYear = IF(CurrentYear = 2023, 2022, CurrentYear)&lt;BR /&gt;VAR TotalMonths = IF(CurrentYear = 2023, PreviousMonth, 12)&lt;/P&gt;&lt;P&gt;RETURN&lt;BR /&gt;DIVIDE(&lt;BR /&gt;CALCULATE(DISTINCTCOUNT('YourTable'[Name]),&lt;BR /&gt;'YourTable'[Month] &amp;gt;= DATE(StartYear, 1, 1),&lt;BR /&gt;'YourTable'[Month] &amp;lt;= DATE(EndYear, TotalMonths, 1)&lt;BR /&gt;),&lt;BR /&gt;IF(CurrentYear = 2023, TotalMonths, 12)&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;Give it a Thumbs up if this solves your challenge.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jul 2023 15:19:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Average/m-p/3344820#M125563</guid>
      <dc:creator>connect</dc:creator>
      <dc:date>2023-07-22T15:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Average/m-p/3344885#M125568</link>
      <description>&lt;P&gt;Please provide your work-in-progress Power BI Desktop file (with sensitive information removed) that covers your issue or question completely in a usable format (not as a screenshot).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This allows members of the Forum to assess the state of the model, report layer, relationships, and any DAX applied.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jul 2023 17:05:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Average/m-p/3344885#M125568</guid>
      <dc:creator>foodd</dc:creator>
      <dc:date>2023-07-22T17:05:41Z</dc:date>
    </item>
  </channel>
</rss>

