<?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: How to create cumulative weighted average for every month in DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-cumulative-weighted-average-for-every-month-in-DAX/m-p/2672581#M79750</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="417222" data-lia-user-login="Elwira_A" class="lia-mention lia-mention-user"&gt;Elwira_A&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe you can try this code to do that:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
VAR _s =
    SUMMARIZE (
        FILTER ( ALLSELECTED ( 'date' ), [Date] &amp;lt;= MAX ( 'Table'[Date] ) ),
        [Date].[Month],
        "sum*days", SUM ( 'Table'[Values] ) * [Days],
        "days", [Days]
    )
RETURN
    DIVIDE ( SUMX ( _s, [sum*days] ), SUMX ( _s, [days] ) )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pbix in the end you can refer.&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ chenwu zhu&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Aug 2022 10:12:39 GMT</pubDate>
    <dc:creator>v-chenwuz-msft</dc:creator>
    <dc:date>2022-08-01T10:12:39Z</dc:date>
    <item>
      <title>How to create cumulative weighted average for every month in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-cumulative-weighted-average-for-every-month-in-DAX/m-p/2664470#M79121</link>
      <description>&lt;P&gt;Hi I have an issue,&lt;BR /&gt;I try to calculate cumulative weightet average for every month (days and Total already are measures)&lt;BR /&gt;I have data:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;And I what to have for every month:&lt;BR /&gt;Jan = (total * days) / days&lt;BR /&gt;Feb = (Jan(total*days) + Feb(total*days)) / (Jan(days) + Feb(days))&lt;BR /&gt;March =&amp;nbsp;(Jan(total*days) + Feb(total*days) + Mar(total*days)) / (Jan(days) + Feb(days)+Mar(days))&lt;BR /&gt;and so on...&lt;BR /&gt;how it is possible in Dax?&lt;BR /&gt;&lt;BR /&gt;of course I have data not in one table, but Total and Days - are already measures.&lt;BR /&gt;&lt;BR /&gt;Thanks for help!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 09:26:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-cumulative-weighted-average-for-every-month-in-DAX/m-p/2664470#M79121</guid>
      <dc:creator>Elwira_A</dc:creator>
      <dc:date>2022-07-27T09:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to create cumulative weighted average for every month in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-cumulative-weighted-average-for-every-month-in-DAX/m-p/2665376#M79196</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="417222" data-lia-user-login="Elwira_A" class="lia-mention lia-mention-user"&gt;Elwira_A&lt;/a&gt; , Try a measure like below. I am using date table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cumm = CALCULATE(averageX(values('Date'[Date]),calculate(SUM(Sales[Sales Amount]))) ,filter(allselected('Date'),'Date'[date] &amp;lt;=max('Date'[date])))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :&lt;A href="https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions" target="_blank"&gt;radacad&lt;/A&gt; &lt;A href="https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/" target="_blank"&gt;sqlbi&lt;/A&gt; &lt;A href="https://www.youtube.com/playlist?list=PLPaNVDMhUXGYLz-w8ERQOo3KYARs7GgG-" target="_blank"&gt;My Video Series&lt;/A&gt; Appreciate your Kudos. &lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 14:55:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-cumulative-weighted-average-for-every-month-in-DAX/m-p/2665376#M79196</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-07-27T14:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to create cumulative weighted average for every month in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-cumulative-weighted-average-for-every-month-in-DAX/m-p/2665574#M79225</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I also use a date table.&lt;BR /&gt;But it isnt a solution, only for Total it is working, but when I multiply Total * Days = I have wrong data.&lt;BR /&gt;so the question is how to do it to get good results.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 16:17:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-cumulative-weighted-average-for-every-month-in-DAX/m-p/2665574#M79225</guid>
      <dc:creator>Elwira_A</dc:creator>
      <dc:date>2022-07-27T16:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to create cumulative weighted average for every month in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-cumulative-weighted-average-for-every-month-in-DAX/m-p/2672581#M79750</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="417222" data-lia-user-login="Elwira_A" class="lia-mention lia-mention-user"&gt;Elwira_A&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe you can try this code to do that:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
VAR _s =
    SUMMARIZE (
        FILTER ( ALLSELECTED ( 'date' ), [Date] &amp;lt;= MAX ( 'Table'[Date] ) ),
        [Date].[Month],
        "sum*days", SUM ( 'Table'[Values] ) * [Days],
        "days", [Days]
    )
RETURN
    DIVIDE ( SUMX ( _s, [sum*days] ), SUMX ( _s, [days] ) )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pbix in the end you can refer.&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ chenwu zhu&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 10:12:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-cumulative-weighted-average-for-every-month-in-DAX/m-p/2672581#M79750</guid>
      <dc:creator>v-chenwuz-msft</dc:creator>
      <dc:date>2022-08-01T10:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to create cumulative weighted average for every month in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-cumulative-weighted-average-for-every-month-in-DAX/m-p/2672648#M79755</link>
      <description>&lt;P&gt;It is great! I was looking for it! Thank you!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 10:45:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-cumulative-weighted-average-for-every-month-in-DAX/m-p/2672648#M79755</guid>
      <dc:creator>Elwira_A</dc:creator>
      <dc:date>2022-08-01T10:45:29Z</dc:date>
    </item>
  </channel>
</rss>

