<?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 Calculated DAX for Current Month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-DAX-for-Current-Month/m-p/4073436#M161725</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering if there was a way to use the calculate function to calculate for current month. I know you can create a calculated column in the data set for this but i'd rather not add a whole column for just 'current month' true/false.&lt;BR /&gt;&lt;BR /&gt;What i'm trying to do is calculate the income but only for the current month. In my head I thought I could do something like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Calculate(
     [Income],
     ('Report'[Income Date],Month(Today))
)&lt;/LI-CODE&gt;&lt;P&gt;But this doesn't work.&lt;BR /&gt;I also know I can just add a filter on the visuals but I'm going to reuse this measure so would rather it was consistent everywhere.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know what the correct DAX is for this and if it's even possible?&lt;/P&gt;&lt;P&gt;Thankyou for your help.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Aug 2024 11:31:50 GMT</pubDate>
    <dc:creator>samblackshaw28</dc:creator>
    <dc:date>2024-08-01T11:31:50Z</dc:date>
    <item>
      <title>Calculated DAX for Current Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-DAX-for-Current-Month/m-p/4073436#M161725</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering if there was a way to use the calculate function to calculate for current month. I know you can create a calculated column in the data set for this but i'd rather not add a whole column for just 'current month' true/false.&lt;BR /&gt;&lt;BR /&gt;What i'm trying to do is calculate the income but only for the current month. In my head I thought I could do something like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Calculate(
     [Income],
     ('Report'[Income Date],Month(Today))
)&lt;/LI-CODE&gt;&lt;P&gt;But this doesn't work.&lt;BR /&gt;I also know I can just add a filter on the visuals but I'm going to reuse this measure so would rather it was consistent everywhere.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know what the correct DAX is for this and if it's even possible?&lt;/P&gt;&lt;P&gt;Thankyou for your help.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 11:31:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-DAX-for-Current-Month/m-p/4073436#M161725</guid>
      <dc:creator>samblackshaw28</dc:creator>
      <dc:date>2024-08-01T11:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated DAX for Current Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-DAX-for-Current-Month/m-p/4073472#M161726</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;it depends on what you really want to do and how it is built your calendar table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That said, you can use the function totalmtd.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or for example if you have year and month columns in the calendar table you could write like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;calculate(income, calendar[month]=month(today()), calendar[year]=year(today()))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this help you&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 11:58:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-DAX-for-Current-Month/m-p/4073472#M161726</guid>
      <dc:creator>Gabry</dc:creator>
      <dc:date>2024-08-01T11:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated DAX for Current Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-DAX-for-Current-Month/m-p/4073478#M161727</link>
      <description>&lt;P&gt;Instead of using DAX, you could also simply filter your visual or page. For date fields you will see relative date filter options.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;What I tend to do however is to have a date dimension with a calculated "relative month" column, where 0 is the current and -1 the previous, so you can easily create filters and measures for current mont, previous month, last 12 months etc.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 12:00:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-DAX-for-Current-Month/m-p/4073478#M161727</guid>
      <dc:creator>sjoerdvn</dc:creator>
      <dc:date>2024-08-01T12:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated DAX for Current Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-DAX-for-Current-Month/m-p/4080173#M161971</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="784176" data-lia-user-login="samblackshaw28" class="lia-mention lia-mention-user"&gt;samblackshaw28&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="226664" data-lia-user-login="sjoerdvn" class="lia-mention lia-mention-user"&gt;sjoerdvn&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="470368" data-lia-user-login="Gabry" class="lia-mention lia-mention-user"&gt;Gabry&lt;/a&gt;&amp;nbsp;Thank you very much for your prompt reply, please allow me to share some content here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For your question, here is the method I provided:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's some dummy data&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;“Report”&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
var _today= TODAY()
RETURN
CALCULATE(
    SUM('Report'[Income]),
    FILTER(
        ALL('Report'),
        MONTH('Report'[Income Date]) = MONTH(_today) 
        &amp;amp;&amp;amp;
        YEAR('Report'[Income Date]) = YEAR(_today)))
        &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the result.&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;Regards,&lt;/P&gt;
&lt;P&gt;Nono Chen&lt;/P&gt;
&lt;P&gt;If this &lt;STRONG&gt;&lt;EM&gt;post&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;helps, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2024 07:06:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-DAX-for-Current-Month/m-p/4080173#M161971</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-05T07:06:41Z</dc:date>
    </item>
  </channel>
</rss>

