<?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: Dynamic Running Total in Parent-Child Hierarchy in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Running-Total-in-Parent-Child-Hierarchy/m-p/2715821#M82679</link>
    <description>&lt;P&gt;correct&lt;/P&gt;</description>
    <pubDate>Mon, 22 Aug 2022 06:40:42 GMT</pubDate>
    <dc:creator>eugentov</dc:creator>
    <dc:date>2022-08-22T06:40:42Z</dc:date>
    <item>
      <title>Dynamic Running Total in Parent-Child Hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Running-Total-in-Parent-Child-Hierarchy/m-p/2705464#M82026</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a list of elements [1 through 7] which are hierarchly ordered as shown in the screenshot below (see diagram).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Each element has its own cost (column F). Through a Path Function I was able to trace the Parent-Child Relationship using Power Pivot / Power BI. I would like to know how cna I calculate column G (Dynamic Running Total Costs) in Power DAX, and if there is a way to replicate this in Excel.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;You may see on column I shows how column G was calculated.&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;Additionally, it is desired that if data is filtered out (i.e., 5 is taken out) it will reflect on the remaining entries (running cost would decrease).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 07:28:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Running-Total-in-Parent-Child-Hierarchy/m-p/2705464#M82026</guid>
      <dc:creator>eugentov</dc:creator>
      <dc:date>2022-08-17T07:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Running Total in Parent-Child Hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Running-Total-in-Parent-Child-Hierarchy/m-p/2715312#M82652</link>
      <description>&lt;P&gt;Wait what, each hierarchy level has their own cost plus the cost of all their lower levels?!?&lt;/P&gt;</description>
      <pubDate>Sun, 21 Aug 2022 22:41:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Running-Total-in-Parent-Child-Hierarchy/m-p/2715312#M82652</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-08-21T22:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Running Total in Parent-Child Hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Running-Total-in-Parent-Child-Hierarchy/m-p/2715821#M82679</link>
      <description>&lt;P&gt;correct&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 06:40:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Running-Total-in-Parent-Child-Hierarchy/m-p/2715821#M82679</guid>
      <dc:creator>eugentov</dc:creator>
      <dc:date>2022-08-22T06:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Running Total in Parent-Child Hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Running-Total-in-Parent-Child-Hierarchy/m-p/2718202#M82795</link>
      <description>&lt;P&gt;You can use PATHCONTAINS() as a filter for this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Source data Table:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("NYvBDQAgCAN36ZuHAuowhP3XEBAfJHctNcME1S0ZcDLwd30uwZlp99o++fnKLr37HZybnp/AXe9wvw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Sort Number" = _t, Parent = _t, #"Total Cost" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Total Cost", Currency.Type}})
in
    #"Changed Type"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Calculated columns:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Path = PATH('Table'[Sort Number],'Table'[Parent])

Cumulative = 
var s= [Sort Number]
return CALCULATE(sum('Table'[Total Cost]),ALL('Table'),PATHCONTAINS('Table'[Path],s))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 20:04:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Running-Total-in-Parent-Child-Hierarchy/m-p/2718202#M82795</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-08-22T20:04:26Z</dc:date>
    </item>
  </channel>
</rss>

