<?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: Sum after and before the ongoing month in one DAX formula in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-after-and-before-the-ongoing-month-in-one-DAX-formula/m-p/2633344#M77125</link>
    <description>&lt;P&gt;Can you confirm whether the data type for that date column is date or string?&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jul 2022 10:22:32 GMT</pubDate>
    <dc:creator>Dhacd</dc:creator>
    <dc:date>2022-07-12T10:22:32Z</dc:date>
    <item>
      <title>Sum after and before the ongoing month in one DAX formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-after-and-before-the-ongoing-month-in-one-DAX-formula/m-p/2633014#M77088</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this formula which calculate the sum of all my PO with type = "PO delivery" :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;PO Delivery M-1 = CALCULATE(SUM(TPODeliveries[Delivered value in €]), TPODeliveries[Type] = "PO_Delivery")&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;However I want add a filter. I want the sum of all my PO with type = "PO Delivery" except for the ongoing month. I want the sum of all month before the ongoing month and the sum after the ongoing month in one formula.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I don't konw if you understand what I search to do. Don't hesitate if we need more information.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks in advance for any help.&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 08:35:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-after-and-before-the-ongoing-month-in-one-DAX-formula/m-p/2633014#M77088</guid>
      <dc:creator>PBIBeginner2022</dc:creator>
      <dc:date>2022-07-12T08:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Sum after and before the ongoing month in one DAX formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-after-and-before-the-ongoing-month-in-one-DAX-formula/m-p/2633048#M77095</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="392943" data-lia-user-login="PBIBeginner2022" class="lia-mention lia-mention-user"&gt;PBIBeginner2022&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Have you tried adding the below filter condition in the calculate function?&lt;BR /&gt;&lt;SPAN&gt;table[date]&amp;lt;(EOMONTH(today(), -1) + 1)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If this post helps, then please consider accepting it as the solution to help the other members find it more quickly.&lt;BR /&gt;Regards,&lt;BR /&gt;Atma.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 08:48:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-after-and-before-the-ongoing-month-in-one-DAX-formula/m-p/2633048#M77095</guid>
      <dc:creator>Dhacd</dc:creator>
      <dc:date>2022-07-12T08:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Sum after and before the ongoing month in one DAX formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-after-and-before-the-ongoing-month-in-one-DAX-formula/m-p/2633055#M77096</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="392943" data-lia-user-login="PBIBeginner2022" class="lia-mention lia-mention-user"&gt;PBIBeginner2022&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe something like this?&lt;/P&gt;&lt;PRE&gt;PO Delivery M-1 = 
VAR _ongoingMonth = MONTH ( TODAY() )
RETURN
CALCULATE ( 
    SUM (TPODeliveries[Delivered value in €]), 
    TPODeliveries[Type] = "PO_Delivery"),
    MONTH ( TPODeliveries[Date] ) = _ongoingMonth 
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You probably need to tweak some parts of the formular with the correct column names of your model etc. Also, I assumed the ongoing month is the same as the current month. I'd suggest to build a date table into your model, too, if you haven't done so.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if this helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; You may share some example data so it'll be easier to assist you, if things are still unclear.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Tom&lt;BR /&gt;&lt;A href="https://www.tackytech.blog/" target="_blank"&gt;https://www.tackytech.blog/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.instagram.com/tackytechtom/" target="_blank"&gt;https://www.instagram.com/tackytechtom/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 08:49:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-after-and-before-the-ongoing-month-in-one-DAX-formula/m-p/2633055#M77096</guid>
      <dc:creator>tackytechtom</dc:creator>
      <dc:date>2022-07-12T08:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: Sum after and before the ongoing month in one DAX formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-after-and-before-the-ongoing-month-in-one-DAX-formula/m-p/2633085#M77099</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="353745" data-lia-user-login="tackytechtom" class="lia-mention lia-mention-user"&gt;tackytechtom&lt;/a&gt;&amp;nbsp;thanks for your answer. But I don't want the sum of the current month. I want all month except the current month &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you a formula for this ? please&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 08:57:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-after-and-before-the-ongoing-month-in-one-DAX-formula/m-p/2633085#M77099</guid>
      <dc:creator>PBIBeginner2022</dc:creator>
      <dc:date>2022-07-12T08:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: Sum after and before the ongoing month in one DAX formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-after-and-before-the-ongoing-month-in-one-DAX-formula/m-p/2633275#M77115</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="392943" data-lia-user-login="PBIBeginner2022" class="lia-mention lia-mention-user"&gt;PBIBeginner2022&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oh yeah! I misread.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a look in here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Not-Current-Month-of-Current-Year/td-p/1759503" target="_blank"&gt;Solved: Not Current Month of Current Year - Microsoft Power BI Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, you might wanna consider to do the filtering on the visualisation level. The filter pane has a lot offer in that sense, too &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Tom&lt;BR /&gt;&lt;A href="https://www.tackytech.blog/" target="_blank"&gt;https://www.tackytech.blog/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.instagram.com/tackytechtom/" target="_blank"&gt;https://www.instagram.com/tackytechtom/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 09:56:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-after-and-before-the-ongoing-month-in-one-DAX-formula/m-p/2633275#M77115</guid>
      <dc:creator>tackytechtom</dc:creator>
      <dc:date>2022-07-12T09:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Sum after and before the ongoing month in one DAX formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-after-and-before-the-ongoing-month-in-one-DAX-formula/m-p/2633330#M77123</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="353745" data-lia-user-login="tackytechtom" class="lia-mention lia-mention-user"&gt;tackytechtom&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="356327" data-lia-user-login="Dhacd" class="lia-mention lia-mention-user"&gt;Dhacd&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table date with a column MonthYear in format "MMMM YYYY" between "January 1899" to "December 2201". I need to calulate my sum with the specific type on all month of my column MonthYear except the current month -1. Could you help me please&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 10:15:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-after-and-before-the-ongoing-month-in-one-DAX-formula/m-p/2633330#M77123</guid>
      <dc:creator>PBIBeginner2022</dc:creator>
      <dc:date>2022-07-12T10:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: Sum after and before the ongoing month in one DAX formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-after-and-before-the-ongoing-month-in-one-DAX-formula/m-p/2633344#M77125</link>
      <description>&lt;P&gt;Can you confirm whether the data type for that date column is date or string?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 10:22:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-after-and-before-the-ongoing-month-in-one-DAX-formula/m-p/2633344#M77125</guid>
      <dc:creator>Dhacd</dc:creator>
      <dc:date>2022-07-12T10:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Sum after and before the ongoing month in one DAX formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-after-and-before-the-ongoing-month-in-one-DAX-formula/m-p/2633589#M77140</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="356327" data-lia-user-login="Dhacd" class="lia-mention lia-mention-user"&gt;Dhacd&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My data is in date format&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 12:04:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-after-and-before-the-ongoing-month-in-one-DAX-formula/m-p/2633589#M77140</guid>
      <dc:creator>PBIBeginner2022</dc:creator>
      <dc:date>2022-07-12T12:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: Sum after and before the ongoing month in one DAX formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-after-and-before-the-ongoing-month-in-one-DAX-formula/m-p/2640863#M77525</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="392943" data-lia-user-login="PBIBeginner2022" class="lia-mention lia-mention-user"&gt;PBIBeginner2022&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;sum of all month before the ongoing month =
CALCULATE(SUM('Table'[Delivered value in €]),FILTER(ALL('Table'),
'Table'[Date]&amp;gt;=DATE(
    YEAR(TODAY()),1,1)&amp;amp;&amp;amp;
'Table'[Date]&amp;lt;
DATE(
    YEAR(TODAY()),MONTH(TODAY()),1)))
&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;sum after the ongoing month in one formula =
CALCULATE(SUM('Table'[Delivered value in €]),FILTER(ALL('Table'),
'Table'[Date]&amp;gt;DATE(YEAR(TODAY()),MONTH(TODAY())+1,1)-1&amp;amp;&amp;amp;
'Table'[Date]&amp;lt;=
DATE(
    YEAR(TODAY())+1,1,1)-1
))&lt;/LI-CODE&gt;
&lt;P&gt;2. Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If you need pbix, please click &lt;A href="https://m365x668238-my.sharepoint.com/:u:/g/personal/yangliu_m365x668238_onmicrosoft_com/Ef0Mlif2ahFPpyCVf4xCjt4BX1uLmg5zZoGqWH-rURv3zw?e=SJZpCy" target="_blank"&gt;here.&lt;/A&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>Fri, 15 Jul 2022 09:15:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-after-and-before-the-ongoing-month-in-one-DAX-formula/m-p/2640863#M77525</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-15T09:15:47Z</dc:date>
    </item>
  </channel>
</rss>

