<?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 for Charges in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-for-Charges/m-p/4354470#M172893</link>
    <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="355887" data-lia-user-login="edge9999" class="lia-mention lia-mention-user"&gt;edge9999&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can try this formula to find running total for charges&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;running total = 
var current_unit = MAX(VW_TICKET_LINEITEMS[Unit])
RETURN
CALCULATE(SUMX(FILTER(ALL(VW_TICKET_LINEITEMS),
                      VW_TICKET_LINEITEMS[Unit] &amp;lt;= current_unit),[Total Charges]))&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this post&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;SPAN&gt;, then please consider&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jan 2025 05:29:18 GMT</pubDate>
    <dc:creator>vivek31</dc:creator>
    <dc:date>2025-01-08T05:29:18Z</dc:date>
    <item>
      <title>Running Total for Charges</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-for-Charges/m-p/4353992#M172872</link>
      <description>&lt;P&gt;I have a faily simple problem (I think) that i just cant get my head around.&amp;nbsp; &amp;nbsp;We have numerous transaction lines, each with a dollar amount and a truck associated wtih them.&amp;nbsp; &amp;nbsp; I'm trying to do a quick matrix where the Revenue per truck is summed up (easy part), and then the fees for that truck are calculated.&amp;nbsp; &amp;nbsp; If the revenue is 25-150K the Fee is $300, if the Revenue is Greater than 150K, the fee is $500 (can also display this).&amp;nbsp; &amp;nbsp;But the part i can't get is a total of the fees.&amp;nbsp; &amp;nbsp;I need seom sort of running total on the column titled total in the matrix shown below.&amp;nbsp; &amp;nbsp; I think i understand why the totals for the 25-150k and Over 150K columns dont work, but i just need to get some way to come up with the total fee and display it.&amp;nbsp; &amp;nbsp;Any feedback is appreciated.&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;Formulas in columns 1, 2 and 3 repectively&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MS_LINE_AMOUNT =&lt;/SPAN&gt; &lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;VW_TICKET_LINEITEMS&lt;/SPAN&gt;&lt;SPAN&gt;[AMOUNT]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MS_25_150K =&lt;/SPAN&gt; &lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[MS_LINE_AMOUNT]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;25000&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;[MS_LINE_AMOUNT]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;150000&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;300&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MS_OVER150K = &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;([MS_LINE_AMOUNT] &amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;150000&lt;/SPAN&gt;&lt;SPAN&gt; ,&lt;/SPAN&gt;&lt;SPAN&gt;500&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2025 20:51:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-for-Charges/m-p/4353992#M172872</guid>
      <dc:creator>edge9999</dc:creator>
      <dc:date>2025-01-07T20:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: Running Total for Charges</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-for-Charges/m-p/4354134#M172883</link>
      <description>&lt;P&gt;Consider using a Quick Measure for that. It has a "Running Total"&amp;nbsp; pattern that is pretty solid.&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;</description>
      <pubDate>Tue, 07 Jan 2025 23:39:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-for-Charges/m-p/4354134#M172883</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-01-07T23:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: Running Total for Charges</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-for-Charges/m-p/4354338#M172890</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="355887" data-lia-user-login="edge9999" class="lia-mention lia-mention-user"&gt;edge9999&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try the following methods.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure 25_150K = SUMX(VW_TICKET_LINEITEMS,[MS_25_150K])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Measure OVER150K = SUMX(VW_TICKET_LINEITEMS,[MS_OVER150K])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Measure Total = [Measure 25_150K]+[Measure OVER150K]&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Total = SUMX(FILTER(ALL(VW_TICKET_LINEITEMS),[Unit]&amp;lt;=MAX(VW_TICKET_LINEITEMS[Unit])),[Measure Total])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Is this the result you expected?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Charlotte&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2025 05:44:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-for-Charges/m-p/4354338#M172890</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-01-08T05:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Running Total for Charges</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-for-Charges/m-p/4354470#M172893</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="355887" data-lia-user-login="edge9999" class="lia-mention lia-mention-user"&gt;edge9999&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can try this formula to find running total for charges&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;running total = 
var current_unit = MAX(VW_TICKET_LINEITEMS[Unit])
RETURN
CALCULATE(SUMX(FILTER(ALL(VW_TICKET_LINEITEMS),
                      VW_TICKET_LINEITEMS[Unit] &amp;lt;= current_unit),[Total Charges]))&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this post&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;SPAN&gt;, then please consider&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2025 05:29:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-for-Charges/m-p/4354470#M172893</guid>
      <dc:creator>vivek31</dc:creator>
      <dc:date>2025-01-08T05:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Running Total for Charges</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-for-Charges/m-p/4355715#M172927</link>
      <description>&lt;P&gt;I think i may have missed explaining a piece.&amp;nbsp; &amp;nbsp; There are multiple transactions for each Unit which means that in the visual above, the Revenue is actually the sum of many records.&amp;nbsp; &amp;nbsp; I dont think i can use SUMX as the Revenue needs to be summed for the period before I can determine what rate to apply (either the $300 or the $500).&amp;nbsp; &amp;nbsp; I also tried adding a quick measure for a running total with no luck.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2025 18:46:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-for-Charges/m-p/4355715#M172927</guid>
      <dc:creator>edge9999</dc:creator>
      <dc:date>2025-01-08T18:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Running Total for Charges</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-for-Charges/m-p/4355843#M172933</link>
      <description>&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;Do not include sensitive information. Do not include anything that is unrelated to the issue or question. &lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Need help uploading data? &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2025 21:19:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-for-Charges/m-p/4355843#M172933</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-01-08T21:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: Running Total for Charges</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-for-Charges/m-p/4367980#M173422</link>
      <description>&lt;P&gt;I have attached some sample data.&amp;nbsp; The first tab is raw data.&amp;nbsp; The Calc tab is what i'm trying to create in Power BI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://1drv.ms/x/c/9a94a6e6c3efc82a/EUSh8cO37PtLv9tDgxZV6JkB8wzExlR2p-o32PCZLASpYg?e=KS12Yb" target="_self"&gt;Link&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2025 19:45:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-for-Charges/m-p/4367980#M173422</guid>
      <dc:creator>edge9999</dc:creator>
      <dc:date>2025-01-16T19:45:53Z</dc:date>
    </item>
  </channel>
</rss>

