<?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: Cumulative sum on average value and month as axis in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-sum-on-average-value-and-month-as-axis/m-p/4014605#M158174</link>
    <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="472543" data-lia-user-login="krishb1414" class="lia-mention lia-mention-user"&gt;krishb1414&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Based on my testing again, please &lt;SPAN&gt;try the following methods again:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1.Create the sample table.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2.Create the new measure to calculate the month average.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Month average = AVERAGEX('Table date', 'Table date'[Values])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;3.Create the new measure to cumulative sum average.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Cumulative sum month = 
var sel_year = SELECTEDVALUE('Table date'[Year])
var sel_month = SELECTEDVALUE('Table date'[Month])
VAR _vtable = SUMMARIZE(ALLSELECTED('Table date'), 'Table date'[Year], 'Table date'[Month], "_Sum", [Month average])
VAR _vtable2 = ADDCOLUMNS(_vtable, "_Less", SUMX(FILTER(_vtable,[Month] &amp;lt;= sel_month &amp;amp;&amp;amp; [Year] = sel_year), [_Sum]))
RETURN 
SUMX(FILTER(_vtable2, [Month] = MAX('Table date'[Month]) &amp;amp;&amp;amp; [Year] = MAX('Table date'[Year])), [_Less])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;4.Drag the measures into the bar chart. Set the Date column to show year and month.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;5.The result is shown below.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Wisdom Wu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Jun 2024 03:26:18 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-06-28T03:26:18Z</dc:date>
    <item>
      <title>Cumulative sum on average value and month as axis</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-sum-on-average-value-and-month-as-axis/m-p/4014013#M158115</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have average measure and I want to show bar chart with average by year and drill down to month.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;while showing in month I want values like cumulative.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;For example, Jan = Jan, Feb= Jan + Feb like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Measure: calculate ([average measure], filter(all(dim_date), dim_date &amp;lt;= max(dim_date).&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&amp;nbsp;as per above measure I m getting sum by month&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;but not cumulative value.&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Any one help me on this , Thanks&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Thu, 27 Jun 2024 17:55:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-sum-on-average-value-and-month-as-axis/m-p/4014013#M158115</guid>
      <dc:creator>krishb1414</dc:creator>
      <dc:date>2024-06-27T17:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative sum on average value and month as axis</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-sum-on-average-value-and-month-as-axis/m-p/4014605#M158174</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="472543" data-lia-user-login="krishb1414" class="lia-mention lia-mention-user"&gt;krishb1414&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Based on my testing again, please &lt;SPAN&gt;try the following methods again:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1.Create the sample table.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2.Create the new measure to calculate the month average.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Month average = AVERAGEX('Table date', 'Table date'[Values])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;3.Create the new measure to cumulative sum average.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Cumulative sum month = 
var sel_year = SELECTEDVALUE('Table date'[Year])
var sel_month = SELECTEDVALUE('Table date'[Month])
VAR _vtable = SUMMARIZE(ALLSELECTED('Table date'), 'Table date'[Year], 'Table date'[Month], "_Sum", [Month average])
VAR _vtable2 = ADDCOLUMNS(_vtable, "_Less", SUMX(FILTER(_vtable,[Month] &amp;lt;= sel_month &amp;amp;&amp;amp; [Year] = sel_year), [_Sum]))
RETURN 
SUMX(FILTER(_vtable2, [Month] = MAX('Table date'[Month]) &amp;amp;&amp;amp; [Year] = MAX('Table date'[Year])), [_Less])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;4.Drag the measures into the bar chart. Set the Date column to show year and month.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;5.The result is shown below.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Wisdom Wu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2024 03:26:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-sum-on-average-value-and-month-as-axis/m-p/4014605#M158174</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-06-28T03:26:18Z</dc:date>
    </item>
  </channel>
</rss>

