<?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 Score over time with non-contiguous dates in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Score-over-time-with-non-contiguous-dates/m-p/4653019#M178123</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1234281" target="_blank"&gt;@richhthfc&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We wanted to kindly follow up to&amp;nbsp;check if the solution provided by the super user resolved your issue.&lt;BR /&gt;If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;
&lt;P&gt;Anjan Kumar Chippa&lt;/P&gt;</description>
    <pubDate>Tue, 15 Apr 2025 06:41:34 GMT</pubDate>
    <dc:creator>v-achippa</dc:creator>
    <dc:date>2025-04-15T06:41:34Z</dc:date>
    <item>
      <title>Average Score over time with non-contiguous dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Score-over-time-with-non-contiguous-dates/m-p/4599043#M176071</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I'm struggling to work out how to do this and would appreciate any advice.&lt;BR /&gt;&lt;BR /&gt;I have a table that has ClientName, Date and Score.&lt;BR /&gt;I want to plot the average score over time.&lt;BR /&gt;However, not all of the date values are contiguous. So it may be that some ClientName have an entry every day, whilst others have an entry every other month.&lt;BR /&gt;&lt;BR /&gt;I have simulated the data with this table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ClientScoresOverTime = 
DATATABLE(
    "ClientName", STRING,
    "Date", DATETIME,
    "Score", INTEGER,
    {
        {"GoodClient","2025-01-12 00:00:00", 45},
        {"GoodClient","2025-02-24 00:00:00", 46},
        {"GoodClient","2025-03-02 00:00:00", 47},
        {"GoodClient","2025-04-14 00:00:00", 48},
        {"MediumClient","2025-01-12 00:00:00", 25},
        {"MediumClient","2025-02-12 00:00:00", 26},
        {"MediumClient","2025-03-06 00:00:00", 27},
        {"MediumClient","2025-04-17 00:00:00", 28},
        {"PoorClient","2025-01-12 00:00:00", 5},
        {"PoorClient","2025-02-05 00:00:00", 6},
        {"PoorClient","2025-03-02 00:00:00", 7},
        {"PoorClient","2025-04-24 00:00:00", 8}
    }
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;When I plot this in a over time, based on month. This works because there is at least one entry for each month and the report shows a gradual increase in the average score over time.&lt;BR /&gt;&lt;img /&gt;&lt;P&gt;However the real data is more like this - some entries are missing. For example the GoodClient does not have an entry in Feb.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ClientScoresOverTime2 = 
DATATABLE(
    "ClientName", STRING,
    "Date", DATETIME,
    "Score", INTEGER,
    {
        {"GoodClient","2025-01-12 00:00:00", 45},
        {"GoodClient","2025-03-02 00:00:00", 47},
        {"GoodClient","2025-04-14 00:00:00", 48},
        {"MediumClient","2025-01-12 00:00:00", 25},
        {"MediumClient","2025-02-12 00:00:00", 26},
        {"MediumClient","2025-04-17 00:00:00", 28},
        {"PoorClient","2025-01-12 00:00:00", 5},
        {"PoorClient","2025-02-05 00:00:00", 6},
        {"PoorClient","2025-03-02 00:00:00", 7}
    }
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This gives a distorted view of average as the rows are missing.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want is a Measure to calculate a score for a given date as the score carried forward from the last populated date.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;I really want to be able to change the granularity of the report on the time axis - so by day, by week, by month.&lt;/DIV&gt;&lt;DIV&gt;I know that I could calculate and populate a table with every Client-Date combination at the minimum resolution required (for example every day), and use columns to calculate the effective score on every Date. But this will quickly become too big. If we have 2 years of data and 20,000 clients then this would be nearly 15million rows.&lt;BR /&gt;&lt;BR /&gt;How can I do this with a Measure?&lt;BR /&gt;&lt;BR /&gt;I'd like a CurrentScore measure that looks back in time for every single client, so that the average over time for whatever resolution the user chooses (Day, Week, Month, Year) is calculated according to all client scores?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I can't see how to do that. Any ideas?&lt;BR /&gt;&lt;BR /&gt;Many thanks.&lt;/DIV&gt;</description>
      <pubDate>Thu, 06 Mar 2025 17:04:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Score-over-time-with-non-contiguous-dates/m-p/4599043#M176071</guid>
      <dc:creator>richhthfc</dc:creator>
      <dc:date>2025-03-06T17:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: Average Score over time with non-contiguous dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Score-over-time-with-non-contiguous-dates/m-p/4599129#M176076</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1234281" data-lia-user-login="richhthfc" class="lia-mention lia-mention-user"&gt;richhthfc&lt;/a&gt;&amp;nbsp;I did something similar to this using linear interpolation.&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Mind-the-Gap-Irregular-Time-Series/m-p/991790#M436" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Mind-the-Gap-Irregular-Time-Series/m-p/991790#M436&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll see if I can take a closer look at your particular issue and find a more specific solution.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 18:11:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Score-over-time-with-non-contiguous-dates/m-p/4599129#M176076</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2025-03-06T18:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Average Score over time with non-contiguous dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Score-over-time-with-non-contiguous-dates/m-p/4599160#M176078</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1234281" data-lia-user-login="richhthfc" class="lia-mention lia-mention-user"&gt;richhthfc&lt;/a&gt;&amp;nbsp;Came up with this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
    VAR __MonthNo = MAX( 'ClientScoresOverTime2'[MonthNo] )
    VAR __Clients = DISTINCT( ALL('ClientScoresOverTime2'[ClientName]) )
    VAR __Months = DISTINCT( ALL( 'ClientScoresOverTime2'[MonthNo]) )
    VAR __Table = SELECTCOLUMNS( CROSSJOIN( __Clients, __Months ), "__ClientName", [ClientName], "__MonthNo", [MonthNo] )
    VAR __Table1 = ADDCOLUMNS( __Table, "__Value", MAXX( FILTER( ClientScoresOverTime2, [ClientName] = [__ClientName] &amp;amp;&amp;amp; [MonthNo] = [__MonthNo] ), [Score] ) )
    VAR __Table2 = 
        ADDCOLUMNS(
            __Table1,
            "__Value2",
                IF( 
                    [__Value] &amp;lt;&amp;gt; BLANK(), 
                    [__Value], 
                    SUMX( FILTER( ALL('ClientScoresOverTime2'), [ClientName] = [__ClientName] &amp;amp;&amp;amp; [MonthNo] = [__MonthNo] - 1 ), [Score])
                )
        )
    VAR __Table3 = FILTER( __Table2, [__MonthNo] = __MonthNo )
    VAR __Result = AVERAGEX( __Table3, [__Value2] )
RETURN
    __Result&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 06 Mar 2025 18:47:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Score-over-time-with-non-contiguous-dates/m-p/4599160#M176078</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2025-03-06T18:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: Average Score over time with non-contiguous dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Score-over-time-with-non-contiguous-dates/m-p/4645269#M177833</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1234281" data-lia-user-login="richhthfc" class="lia-mention lia-mention-user"&gt;richhthfc&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for reaching out to Microsoft Fabric Community.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;for the prompt response.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As we haven’t heard back from you, we wanted to kindly follow up to&amp;nbsp;check if the solution provided by the super user resolved your issue?&amp;nbsp;or let us know if you need any further assistance.&lt;BR /&gt;If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;
&lt;P&gt;Anjan Kumar Chippa&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 14:22:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Score-over-time-with-non-contiguous-dates/m-p/4645269#M177833</guid>
      <dc:creator>v-achippa</dc:creator>
      <dc:date>2025-04-09T14:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: Average Score over time with non-contiguous dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Score-over-time-with-non-contiguous-dates/m-p/4653019#M178123</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1234281" target="_blank"&gt;@richhthfc&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We wanted to kindly follow up to&amp;nbsp;check if the solution provided by the super user resolved your issue.&lt;BR /&gt;If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;
&lt;P&gt;Anjan Kumar Chippa&lt;/P&gt;</description>
      <pubDate>Tue, 15 Apr 2025 06:41:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Score-over-time-with-non-contiguous-dates/m-p/4653019#M178123</guid>
      <dc:creator>v-achippa</dc:creator>
      <dc:date>2025-04-15T06:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: Average Score over time with non-contiguous dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Score-over-time-with-non-contiguous-dates/m-p/4661272#M178498</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1234281" target="_blank"&gt;@richhthfc&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As we haven’t heard back from you, we wanted to kindly follow up to&amp;nbsp;check if the solution provided by the super user resolved your issue.&lt;BR /&gt;If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;
&lt;P&gt;Anjan Kumar Chippa&lt;/P&gt;</description>
      <pubDate>Mon, 21 Apr 2025 13:31:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Score-over-time-with-non-contiguous-dates/m-p/4661272#M178498</guid>
      <dc:creator>v-achippa</dc:creator>
      <dc:date>2025-04-21T13:31:29Z</dc:date>
    </item>
  </channel>
</rss>

