<?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 until today in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-until-today/m-p/3063823#M106007</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92006" data-lia-user-login="joshua1990" class="lia-mention lia-mention-user"&gt;joshua1990&lt;/a&gt;&amp;nbsp;Handling tomorrow values is pretty easy, you just need an IF statement.&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;  // Your code that results in a running total in a VAR named __RT
  VAR __Result = IF(MAX('Date'[Date]) &amp;gt; TODAY(),BLANK(),__RT)
RETURN
  __Result&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Feb 2023 12:57:31 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2023-02-06T12:57:31Z</dc:date>
    <item>
      <title>Running total until today</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-until-today/m-p/3062461#M105905</link>
      <description>&lt;P&gt;Hi all!&lt;/P&gt;
&lt;P&gt;I have a simple line bar chart that displays the latest information (Sum Value) vs the Budget.&lt;/P&gt;
&lt;P&gt;The line represents the budget accumulated per day for the selected month.&lt;/P&gt;
&lt;P&gt;The bar represents the actual sales.&lt;/P&gt;
&lt;P&gt;Now I would like to display a bar chart for the current month with a line for the full month but bars just for the past and today.&lt;/P&gt;
&lt;P&gt;This measure displays the running total sum until today also for the next days.&lt;/P&gt;
&lt;P&gt;How can I cut this by today?&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Runnint Total = 
CALCULATE(
    SUMX(
        'Calendar',
        [Sales]
    ),
    FILTER(
        ALL( 'Calendar' ),
        'Calendar'[Year]
            = VALUES( 'Calendar'[Year] )
            &amp;amp;&amp;amp; 'Calendar'[Month Num]
                = MAX( 'Calendar'[Month Num] )
            &amp;amp;&amp;amp; 'Calendar'[Date]
                &amp;lt;= MAX( 'Calendar'[Date] )
    )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 05 Feb 2023 20:27:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-until-today/m-p/3062461#M105905</guid>
      <dc:creator>joshua1990</dc:creator>
      <dc:date>2023-02-05T20:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: Running total until today</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-until-today/m-p/3062465#M105906</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92006" data-lia-user-login="joshua1990" class="lia-mention lia-mention-user"&gt;joshua1990&lt;/a&gt;&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Better-Running-Total/m-p/2755666#M885" target="_blank"&gt;Better Running Total - Microsoft Power BI Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Feb 2023 20:37:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-until-today/m-p/3062465#M105906</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-02-05T20:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: Running total until today</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-until-today/m-p/3063058#M105949</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;: Thanks a lot for sharing this alternative. But please note, my question is different &amp;gt; How can I cut a running total chart for the whole month (distributed per day) but with just values for the past?&lt;/P&gt;
&lt;P&gt;Using your approach I still get a values for tomorrow etc.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 06:30:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-until-today/m-p/3063058#M105949</guid>
      <dc:creator>joshua1990</dc:creator>
      <dc:date>2023-02-06T06:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: Running total until today</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-until-today/m-p/3063823#M106007</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92006" data-lia-user-login="joshua1990" class="lia-mention lia-mention-user"&gt;joshua1990&lt;/a&gt;&amp;nbsp;Handling tomorrow values is pretty easy, you just need an IF statement.&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;  // Your code that results in a running total in a VAR named __RT
  VAR __Result = IF(MAX('Date'[Date]) &amp;gt; TODAY(),BLANK(),__RT)
RETURN
  __Result&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 12:57:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-until-today/m-p/3063823#M106007</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-02-06T12:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Running total until today</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-until-today/m-p/3065006#M106090</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92006" data-lia-user-login="joshua1990" class="lia-mention lia-mention-user"&gt;joshua1990&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created some data:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;past and today =
IF(
MAX('Calendar'[Date])&amp;gt;=DATE(YEAR(TODAY()),MONTH(TODAY()),1)
&amp;amp;&amp;amp;
    MAX('Calendar'[Date])&amp;lt;=TODAY(),
SUMX(
    FILTER(ALL('Calendar'),
    'Calendar'[Date]&amp;lt;=MAX('Calendar'[Date])&amp;amp;&amp;amp;'Calendar'[Year]=MAX('Calendar'[Year])&amp;amp;&amp;amp;'Calendar'[Month Num]=MAX('Calendar'[Month Num])),[Sales]),BLANK())&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;full month =
IF(
MAX('Calendar'[Date])&amp;gt;=DATE(YEAR(TODAY()),MONTH(TODAY()),1)
&amp;amp;&amp;amp;
    MAX('Calendar'[Date])&amp;lt;=TODAY(),
SUMX(
    FILTER(ALL('Calendar'),
    'Calendar'[Year]=MAX('Calendar'[Year])&amp;amp;&amp;amp;'Calendar'[Month Num]=MAX('Calendar'[Month Num])),[Sales]),BLANK())&lt;/LI-CODE&gt;
&lt;P&gt;2.&amp;nbsp;Result:&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;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 01:33:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-until-today/m-p/3065006#M106090</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-07T01:33:34Z</dc:date>
    </item>
  </channel>
</rss>

