<?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: How to make current month revenue zero or blank? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-make-current-month-revenue-zero-or-blank/m-p/2704570#M81981</link>
    <description>&lt;LI-CODE lang="csharp"&gt;TOTAL_RS1 =
var Today_ = TODAY()
var CurrentMonthID =
    CALCULATE(
        // MonthId must be unique across all the years.
        // And no, it's not the number of the month
        // in a year. It must be a true ID that is increasing
        // by 1 from the very first month in the calendar
        // to the very last. Such a field should be hidden
        // in the UI as it's only a helper for measures.
        SELECTEDVALUE( Dim_Calendar[MonthID] ),
        Dim_Calendar[Date] = Today_,
        REMOVEFILTERS( Dim_Calendar )
    )
var Result =
    CALCULATE(
        SUM( Agreement_Billing_Report[Extended Price] ),
        // One has to aggregate across all months in
        // the context excluding the current month and
        // all that succeed it. I add KEEPFILTERS just
        // in case you select MonthID in the UI for, say,
        // debugging puropses. But this field should not
        // be able to be selected by the end user.
        KEEPFILTERS( Dim_Calendar[MonthID] &amp;lt; CurrentMonthID )
    )
return
    Result&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 16 Aug 2022 22:53:10 GMT</pubDate>
    <dc:creator>daXtreme</dc:creator>
    <dc:date>2022-08-16T22:53:10Z</dc:date>
    <item>
      <title>How to make current month revenue zero or blank?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-make-current-month-revenue-zero-or-blank/m-p/2704347#M81967</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the below Matrix viz:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;As you can see, Agreements is generating a revenue SUM for Aug (the current month), but I want this to show as blank. What changes can I make to the DAX?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;TOTAL_RS1 = SUM(Agreement_Billing_Report[Extended Price])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The 'Agreement_Billing_Report' table is connected to a Dim_Calendar table, which is how I create this Matric viz. I also have a Rev_Type connected to this table to reference the Revenue Type in the rows, but this is not important for this exercise.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your help would be most appreciated. Thanks&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 20:27:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-make-current-month-revenue-zero-or-blank/m-p/2704347#M81967</guid>
      <dc:creator>sabilahmed</dc:creator>
      <dc:date>2022-08-16T20:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to make current month revenue zero or blank?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-make-current-month-revenue-zero-or-blank/m-p/2704568#M81980</link>
      <description>&lt;LI-CODE lang="javascript"&gt;Agreement Total = CALCULATE(SUMX('Agreement_Billing_Report',IF(DATEDIFF('Agreement_Billing_Report'[Date of Invoice],TODAY(),MONTH) &amp;gt;= 1,'Agreement_Billing_Report'[Extended Price], BLANK())))&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 16 Aug 2022 22:47:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-make-current-month-revenue-zero-or-blank/m-p/2704568#M81980</guid>
      <dc:creator>sabilahmed</dc:creator>
      <dc:date>2022-08-16T22:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to make current month revenue zero or blank?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-make-current-month-revenue-zero-or-blank/m-p/2704570#M81981</link>
      <description>&lt;LI-CODE lang="csharp"&gt;TOTAL_RS1 =
var Today_ = TODAY()
var CurrentMonthID =
    CALCULATE(
        // MonthId must be unique across all the years.
        // And no, it's not the number of the month
        // in a year. It must be a true ID that is increasing
        // by 1 from the very first month in the calendar
        // to the very last. Such a field should be hidden
        // in the UI as it's only a helper for measures.
        SELECTEDVALUE( Dim_Calendar[MonthID] ),
        Dim_Calendar[Date] = Today_,
        REMOVEFILTERS( Dim_Calendar )
    )
var Result =
    CALCULATE(
        SUM( Agreement_Billing_Report[Extended Price] ),
        // One has to aggregate across all months in
        // the context excluding the current month and
        // all that succeed it. I add KEEPFILTERS just
        // in case you select MonthID in the UI for, say,
        // debugging puropses. But this field should not
        // be able to be selected by the end user.
        KEEPFILTERS( Dim_Calendar[MonthID] &amp;lt; CurrentMonthID )
    )
return
    Result&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 16 Aug 2022 22:53:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-make-current-month-revenue-zero-or-blank/m-p/2704570#M81981</guid>
      <dc:creator>daXtreme</dc:creator>
      <dc:date>2022-08-16T22:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to make current month revenue zero or blank?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-make-current-month-revenue-zero-or-blank/m-p/2704573#M81982</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="352657" data-lia-user-login="sabilahmed" class="lia-mention lia-mention-user"&gt;sabilahmed&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One comment on your formula... If Agreement_Billing_Report is a huge table, the measure will be extremely slow as you're iterating it line by line doing computations on each of them. On the other hand, the formula I posted should be very fast even on very big tables. Try to compare the execution times of the two measures.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 22:58:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-make-current-month-revenue-zero-or-blank/m-p/2704573#M81982</guid>
      <dc:creator>daXtreme</dc:creator>
      <dc:date>2022-08-16T22:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to make current month revenue zero or blank?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-make-current-month-revenue-zero-or-blank/m-p/2704575#M81984</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="349489" data-lia-user-login="daXtreme" class="lia-mention lia-mention-user"&gt;daXtreme&lt;/a&gt;&amp;nbsp;So I don't get it, are you saying my solution is incorrect? Because it seems to be working for me.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 23:00:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-make-current-month-revenue-zero-or-blank/m-p/2704575#M81984</guid>
      <dc:creator>sabilahmed</dc:creator>
      <dc:date>2022-08-16T23:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to make current month revenue zero or blank?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-make-current-month-revenue-zero-or-blank/m-p/2705452#M82025</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="349489" data-lia-user-login="daXtreme" class="lia-mention lia-mention-user"&gt;daXtreme&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Excellent point. I'll check this and let you know how it goes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sabil&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 07:25:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-make-current-month-revenue-zero-or-blank/m-p/2705452#M82025</guid>
      <dc:creator>sabilahmed</dc:creator>
      <dc:date>2022-08-17T07:25:44Z</dc:date>
    </item>
  </channel>
</rss>

