<?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 from last 30 results in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-from-last-30-results/m-p/2933311#M96554</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="478325" data-lia-user-login="Pan_Forex" class="lia-mention lia-mention-user"&gt;Pan_Forex&lt;/a&gt; , Create an index column in table using DAX &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;index= rankx(filter(Table, [Player] = earlier([Player]) ), [id],,asc,desc)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a new table&lt;/P&gt;
&lt;P&gt;series = generateseries(Min(Table[index]), Max(Table[index]) ,1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then create join series[value] with rank and create a measure&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;calculate(average(Table[game_score]), filter(all(series) , series[Value] &amp;gt;= max(series[Value]) -30 &amp;amp;&amp;amp; series[Value] &amp;lt;= max(series[Value]) ))&lt;/P&gt;</description>
    <pubDate>Mon, 28 Nov 2022 15:21:39 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2022-11-28T15:21:39Z</dc:date>
    <item>
      <title>Average from last 30 results</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-from-last-30-results/m-p/2933138#M96545</link>
      <description>&lt;P&gt;Hello everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my first post and the beginning of my adventure with dax so please be understanding.&amp;nbsp;I have a table with 3 columns: index, score and player. I try to count the average score of the last 30 indexes for each player.&amp;nbsp;I have over 14,000 lines and over 300 players so for each player the last 30 indexes will be different.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for all the great content you have here - it is a great place to learn &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 14:17:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-from-last-30-results/m-p/2933138#M96545</guid>
      <dc:creator>Pan_Forex</dc:creator>
      <dc:date>2022-11-28T14:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: Average from last 30 results</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-from-last-30-results/m-p/2933311#M96554</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="478325" data-lia-user-login="Pan_Forex" class="lia-mention lia-mention-user"&gt;Pan_Forex&lt;/a&gt; , Create an index column in table using DAX &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;index= rankx(filter(Table, [Player] = earlier([Player]) ), [id],,asc,desc)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a new table&lt;/P&gt;
&lt;P&gt;series = generateseries(Min(Table[index]), Max(Table[index]) ,1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then create join series[value] with rank and create a measure&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;calculate(average(Table[game_score]), filter(all(series) , series[Value] &amp;gt;= max(series[Value]) -30 &amp;amp;&amp;amp; series[Value] &amp;lt;= max(series[Value]) ))&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 15:21:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-from-last-30-results/m-p/2933311#M96554</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-11-28T15:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: Average from last 30 results</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-from-last-30-results/m-p/2933312#M96555</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="478325" data-lia-user-login="Pan_Forex" class="lia-mention lia-mention-user"&gt;Pan_Forex&lt;/a&gt;&amp;nbsp;Can you provide sample data with sensitive data removed&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 15:21:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-from-last-30-results/m-p/2933312#M96555</guid>
      <dc:creator>DimaMD</dc:creator>
      <dc:date>2022-11-28T15:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: Average from last 30 results</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-from-last-30-results/m-p/2933396#M96560</link>
      <description>&lt;P&gt;Hi, thank you very much for your reply! When creating an index column, it displays an error: Unexpected value of the TIES argument in the RANKX function. The allowed values are SKIP and DENSE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My function looks like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;index = &lt;/SPAN&gt;&lt;SPAN&gt;rankx&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;('public players', [Player] = &lt;/SPAN&gt;&lt;SPAN&gt;earlier&lt;/SPAN&gt;&lt;SPAN&gt;([Player]) ), [id],,&lt;/SPAN&gt;&lt;SPAN&gt;asc&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;desc&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 15:48:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-from-last-30-results/m-p/2933396#M96560</guid>
      <dc:creator>Pan_Forex</dc:creator>
      <dc:date>2022-11-28T15:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Average from last 30 results</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-from-last-30-results/m-p/2934007#M96610</link>
      <description>&lt;P&gt;Hello, yea sure &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;here you will find everything&amp;nbsp;&lt;A href="https://we.tl/t-X27MhOsCQD" target="_blank"&gt;https://we.tl/t-X27MhOsCQD&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 22:19:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-from-last-30-results/m-p/2934007#M96610</guid>
      <dc:creator>Pan_Forex</dc:creator>
      <dc:date>2022-11-28T22:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Average from last 30 results</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-from-last-30-results/m-p/2935985#M96755</link>
      <description>&lt;P&gt;I fixed the errors, corrected the relationships and everything works. Thank you very much!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 13:53:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-from-last-30-results/m-p/2935985#M96755</guid>
      <dc:creator>Pan_Forex</dc:creator>
      <dc:date>2022-11-29T13:53:09Z</dc:date>
    </item>
  </channel>
</rss>

