<?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: Conditional Statement to Exclude Balance of Current Month From Results in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Statement-to-Exclude-Balance-of-Current-Month-From/m-p/3974653#M154121</link>
    <description>&lt;P&gt;Correct- I am trying to write this measure correctly to become the Denominator of another measure. The logic used for this calculation is based on two date columns.... which is challenging in it's own way &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;This formula will be divided by the CurrentMonth Total sales.&amp;nbsp;&lt;BR /&gt;So I'm trying to get the TotalSales of the CurrentMonth divided by the Total Sales of any Sale due outside of the CurrentMonth. (Hope I'm explaining that well enough....I'm still grappling with it myself in the BI World since in the SQL world it makes a bit more sense.)&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jun 2024 14:24:56 GMT</pubDate>
    <dc:creator>CracktheCode85</dc:creator>
    <dc:date>2024-06-05T14:24:56Z</dc:date>
    <item>
      <title>Conditional Statement to Exclude Balance of Current Month From Results</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Statement-to-Exclude-Balance-of-Current-Month-From/m-p/3972268#M154034</link>
      <description>&lt;P&gt;Hi Brilliant Folks!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I'm struggling with writing a DAX formula that will do the same as this conditional statement:&lt;/P&gt;&lt;P&gt;Due Current = IF(Due_Date &amp;gt; Current Month, Then Total_Sales, Else '0', EndIF)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Essentially I need the Total_Sales for any Sale that has a Due_Date that is NOT in the current month.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My Due_Date imported as a Hierarchy (not sure if that matters).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm scrubbing through the function library and it's becoming overwhelming to find the right answer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your insight and consideration. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 19:24:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Statement-to-Exclude-Balance-of-Current-Month-From/m-p/3972268#M154034</guid>
      <dc:creator>CracktheCode85</dc:creator>
      <dc:date>2024-06-04T19:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Statement to Exclude Balance of Current Month From Results</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Statement-to-Exclude-Balance-of-Current-Month-From/m-p/3972414#M154042</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have worked on the problem you have provided using assumptions, please let me know if it works.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Sale_ID&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Due_Date&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Total_Sales&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;2024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/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Due_Current =&lt;/P&gt;&lt;P&gt;VAR CurrentMonth = MONTH(TODAY())&lt;/P&gt;&lt;P&gt;VAR CurrentYear = YEAR(TODAY())&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;SWITCH(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TRUE(),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MONTH(EstimateSummaryDataDetails[Due_Date]) &amp;lt;&amp;gt; CurrentMonth || YEAR(EstimateSummaryDataDetails[Due_Date]) &amp;lt;&amp;gt; CurrentYear, SUM(CostUnpivot[Total_Sales]),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;)&lt;BR /&gt;&lt;BR /&gt;If the solutions answers your problem,&amp;nbsp;&lt;SPAN&gt;pls mark my post as a solution and your Kudos is much appreciated!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 21:18:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Statement-to-Exclude-Balance-of-Current-Month-From/m-p/3972414#M154042</guid>
      <dc:creator>Moetazzahran</dc:creator>
      <dc:date>2024-06-04T21:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Statement to Exclude Balance of Current Month From Results</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Statement-to-Exclude-Balance-of-Current-Month-From/m-p/3974519#M154115</link>
      <description>&lt;P&gt;Thank you for providing this!&amp;nbsp;&lt;BR /&gt;When I get to the&amp;nbsp;&lt;BR /&gt;MONTH(EstimateSummaryDataDetails[Due_Date]) I can't input any due date values as the Month function calls for a predefined measure or a caculated one. My due dates are imported as a hierarchy and do not show up as an option for this portion of the formula.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;How can I get the Due Date out of the hierarchy format and input it into this formula?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2024 13:49:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Statement-to-Exclude-Balance-of-Current-Month-From/m-p/3974519#M154115</guid>
      <dc:creator>CracktheCode85</dc:creator>
      <dc:date>2024-06-05T13:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Statement to Exclude Balance of Current Month From Results</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Statement-to-Exclude-Balance-of-Current-Month-From/m-p/3974587#M154117</link>
      <description>&lt;P&gt;Can you please send me a screenshot of your due date format?&lt;BR /&gt;If you don't want the date hierarchy format in your visuals, you can change it this way&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2024 14:06:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Statement-to-Exclude-Balance-of-Current-Month-From/m-p/3974587#M154117</guid>
      <dc:creator>Moetazzahran</dc:creator>
      <dc:date>2024-06-05T14:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Statement to Exclude Balance of Current Month From Results</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Statement-to-Exclude-Balance-of-Current-Month-From/m-p/3974623#M154118</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2024 14:15:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Statement-to-Exclude-Balance-of-Current-Month-From/m-p/3974623#M154118</guid>
      <dc:creator>CracktheCode85</dc:creator>
      <dc:date>2024-06-05T14:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Statement to Exclude Balance of Current Month From Results</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Statement-to-Exclude-Balance-of-Current-Month-From/m-p/3974633#M154119</link>
      <description>&lt;P&gt;This is your base date table, however you can use the feature I showed in my previous reply when you drag and drop within your visuals.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I assume you are writing a measure to be used in a visual. Correct?&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2024 14:18:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Statement-to-Exclude-Balance-of-Current-Month-From/m-p/3974633#M154119</guid>
      <dc:creator>Moetazzahran</dc:creator>
      <dc:date>2024-06-05T14:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Statement to Exclude Balance of Current Month From Results</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Statement-to-Exclude-Balance-of-Current-Month-From/m-p/3974653#M154121</link>
      <description>&lt;P&gt;Correct- I am trying to write this measure correctly to become the Denominator of another measure. The logic used for this calculation is based on two date columns.... which is challenging in it's own way &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;This formula will be divided by the CurrentMonth Total sales.&amp;nbsp;&lt;BR /&gt;So I'm trying to get the TotalSales of the CurrentMonth divided by the Total Sales of any Sale due outside of the CurrentMonth. (Hope I'm explaining that well enough....I'm still grappling with it myself in the BI World since in the SQL world it makes a bit more sense.)&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2024 14:24:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Statement-to-Exclude-Balance-of-Current-Month-From/m-p/3974653#M154121</guid>
      <dc:creator>CracktheCode85</dc:creator>
      <dc:date>2024-06-05T14:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Statement to Exclude Balance of Current Month From Results</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Statement-to-Exclude-Balance-of-Current-Month-From/m-p/3982684#M154418</link>
      <description>&lt;P&gt;&lt;FONT&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="684198" data-lia-user-login="CracktheCode85" class="lia-mention lia-mention-user"&gt;CracktheCode85&lt;/a&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on your needs, I have created the following table.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT&gt;You can use the following DAX to get the&amp;nbsp;&lt;SPAN&gt;Total_Sales for any Sale that has a Due_Date that is NOT in the current month.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total_Sales = 
VAR current_month = MONTH(TODAY())
RETURN
CALCULATE(SUM('Table'[Sales]),FILTER('Table',MONTH('Table'[Due_Date])&amp;lt;current_month))&lt;/LI-CODE&gt;
&lt;P&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;Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&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;Best Regards,&lt;/P&gt;
&lt;P&gt;Jayleny&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, 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, 10 Jun 2024 06:20:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Statement-to-Exclude-Balance-of-Current-Month-From/m-p/3982684#M154418</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-06-10T06:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Statement to Exclude Balance of Current Month From Results</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Statement-to-Exclude-Balance-of-Current-Month-From/m-p/3986710#M154550</link>
      <description>&lt;P&gt;This one seemed to work perfectly for one month. How can I make this 'Current Month' field variable so that if I use a slicer to look at a different month it maintains the currentmonth look back rule?&lt;BR /&gt;Example:&lt;BR /&gt;Currently it filters out June, which is perfect for results in May.&amp;nbsp;&lt;BR /&gt;However if I look back at April it still filters out June only. How can I write this to make it filter out May when I'm looking at April and then have that same function work for May?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2024 18:23:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Statement-to-Exclude-Balance-of-Current-Month-From/m-p/3986710#M154550</guid>
      <dc:creator>CracktheCode85</dc:creator>
      <dc:date>2024-06-11T18:23:10Z</dc:date>
    </item>
  </channel>
</rss>

