<?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: Get the average of X last date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-average-of-X-last-date/m-p/3787464#M147949</link>
    <description>&lt;P&gt;Yes. Works perfectly ! Thank you.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I will analyse why I need a keepfilters here...&lt;/P&gt;</description>
    <pubDate>Sat, 23 Mar 2024 12:09:02 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-03-23T12:09:02Z</dc:date>
    <item>
      <title>Get the average of X last date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-average-of-X-last-date/m-p/3786657#M147902</link>
      <description>&lt;P&gt;Hello everyone,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I stuck with a DAX query which doesn't seems impossible.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I try to get the average for the 5 last date available by client.&amp;nbsp;&lt;BR /&gt;In the following exemple, I want average of the last 5 days available by Client&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;In the exemple, Client 1 got 6 days. The last 5 are from 9/03/2024 to 20/03/2024. I want the average of those days&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;I end up with this DAX query wich absolutly doesn't work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; :&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;AVERAGEX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SP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SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;('Table'[Valeur]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;I need the last date value for my client scope&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;SPAN&gt;&lt;BR /&gt;Can you help me ?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2024 16:29:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-average-of-X-last-date/m-p/3786657#M147902</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-22T16:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: Get the average of X last date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-average-of-X-last-date/m-p/3787040#M147922</link>
      <description>&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;&lt;BR /&gt;Do not include sensitive information or anything not related to the issue or question. &lt;BR /&gt;&lt;BR /&gt;If you are unsure how to upload data please refer to &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-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Want faster answers? &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/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2024 21:33:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-average-of-X-last-date/m-p/3787040#M147922</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-22T21:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Get the average of X last date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-average-of-X-last-date/m-p/3787241#M147936</link>
      <description>&lt;P&gt;You're close.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Mar 2024 06:35:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-average-of-X-last-date/m-p/3787241#M147936</guid>
      <dc:creator>ThxAlot</dc:creator>
      <dc:date>2024-03-23T06:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: Get the average of X last date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-average-of-X-last-date/m-p/3787464#M147949</link>
      <description>&lt;P&gt;Yes. Works perfectly ! Thank you.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I will analyse why I need a keepfilters here...&lt;/P&gt;</description>
      <pubDate>Sat, 23 Mar 2024 12:09:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-average-of-X-last-date/m-p/3787464#M147949</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-23T12:09:02Z</dc:date>
    </item>
  </channel>
</rss>

