<?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: Running total of a measure - take into account slicers in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-of-a-measure-take-into-account-slicers/m-p/1091584#M15805</link>
    <description>&lt;P&gt;I realized that i had to add an allselected&lt;/P&gt;</description>
    <pubDate>Fri, 15 May 2020 13:04:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-05-15T13:04:08Z</dc:date>
    <item>
      <title>Running total of a measure - take into account slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-of-a-measure-take-into-account-slicers/m-p/1091556#M15798</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to calculate a running total of a measure that calculates a division. What I would like to have is what is shown in the table below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;NumberFailures is a basically a count when another column is not blank&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;NumberFailures=calculate( count(DataFailure[Part]); DataFailure[PartOperationalEnd] &amp;lt;&amp;gt; BLANK()) &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NumberParts comes from another table where the total number of parts per year are summarized.&amp;nbsp;&lt;/P&gt;&lt;P&gt;NumberParts = sum(NoParts[NoParts])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the FailureRate would be:&lt;/P&gt;&lt;P&gt;FailureRate =( NumberFailures/sum(NoParts[NoParts]))*100 &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would like to have is a running average, to do so I'm trying to calculate first the running total of the FailureRate and then divide with the year number. For the running total I'm trying the solution suggested&amp;nbsp; &amp;nbsp;&lt;A href="https://forum.enterprisedna.co/t/cumulative-sum-of-a-measure-that-creates-another-cumulative-sum/739" target="_blank" rel="noopener"&gt;here&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AccumFailureRate =&lt;/P&gt;&lt;P&gt;VAR Age = SELECTEDVALUE( NoParts[Year]; 0 )&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;SUMX( FILTER(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SUMMARIZE( NoWTG; NoWTG[Year];&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "FailureRate"; ([NumberFailures]/sum(NoParts[NoParts])*100));&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NoParts[Year] &amp;lt;= Age );&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [FailureRate] ) &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I'm getting the results for all the data and not for the selections of the slicers. I understand it's because of the summarize that I'm aggregating for year, but I don't know how the calculation I need could be done.&lt;/P&gt;&lt;P&gt;Thank you! &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finally, in the non sample data I have two more filters, also neither of them is taken into account when calculating the cummulative total&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 12:42:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-of-a-measure-take-into-account-slicers/m-p/1091556#M15798</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-15T12:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: Running total of a measure - take into account slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-of-a-measure-take-into-account-slicers/m-p/1091571#M15802</link>
      <description>&lt;P&gt;Too complex not to have to recreate this. I don't see what I would expect where you would have an ALL or something that would be removing the slicer filter context.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please see this post regarding How to Get Your Question Answered Quickly: &lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 12:50:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-of-a-measure-take-into-account-slicers/m-p/1091571#M15802</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-05-15T12:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Running total of a measure - take into account slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-of-a-measure-take-into-account-slicers/m-p/1091584#M15805</link>
      <description>&lt;P&gt;I realized that i had to add an allselected&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 13:04:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-of-a-measure-take-into-account-slicers/m-p/1091584#M15805</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-15T13:04:08Z</dc:date>
    </item>
  </channel>
</rss>

