<?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: Compare dates in two columns and then sum 3rd column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-dates-in-two-columns-and-then-sum-3rd-column/m-p/4255106#M168556</link>
    <description>&lt;P&gt;Try this measure&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MM CM :=
CALCULATE(
    SUM('Vendor Trend'[TOTAL MM]),
    'Vendor Trend'[CAP Date Paid] = 'Vendor Trend'[CAP Date Aff]
)&lt;/LI-CODE&gt;
&lt;P&gt;or this one if you're using a calendar table&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MM CM :=
CALCULATE(
    SUM('Vendor Trend'[TOTAL MM]),
    'Calendar'[Date] = 'Calendar_Dt Aff'[Date]
)&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 23 Oct 2024 22:05:56 GMT</pubDate>
    <dc:creator>aduguid</dc:creator>
    <dc:date>2024-10-23T22:05:56Z</dc:date>
    <item>
      <title>Compare dates in two columns and then sum 3rd column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-dates-in-two-columns-and-then-sum-3rd-column/m-p/4254969#M168554</link>
      <description>&lt;P&gt;I am using &lt;U&gt;&lt;STRONG&gt;Power Pivot in EXCEL&lt;/STRONG&gt;&lt;/U&gt; not Power BI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to compare dates with an if statement from two columns and when the date matches I want to sum a 3rd columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the DAX formula I have, which is not working. What do I need to change to be able to compare the dates and then sum up the values?&lt;/P&gt;&lt;P&gt;I also created date tables for the two date columns. Didn't work either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MM CM:=IF(VALUE('Vendor Trend'[CAP Date Paid])=VALUE('Vendor Trend'[CAP Date Aff]), SUM([TOTAL MM]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MM CM:=IF(VALUE('Calendar'[Date])=VALUE('Calendar_Dt Aff'[Date]), SUM([TOTAL MM]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 20:00:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-dates-in-two-columns-and-then-sum-3rd-column/m-p/4254969#M168554</guid>
      <dc:creator>meierli</dc:creator>
      <dc:date>2024-10-23T20:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Compare dates in two columns and then sum 3rd column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-dates-in-two-columns-and-then-sum-3rd-column/m-p/4255106#M168556</link>
      <description>&lt;P&gt;Try this measure&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MM CM :=
CALCULATE(
    SUM('Vendor Trend'[TOTAL MM]),
    'Vendor Trend'[CAP Date Paid] = 'Vendor Trend'[CAP Date Aff]
)&lt;/LI-CODE&gt;
&lt;P&gt;or this one if you're using a calendar table&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MM CM :=
CALCULATE(
    SUM('Vendor Trend'[TOTAL MM]),
    'Calendar'[Date] = 'Calendar_Dt Aff'[Date]
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 23 Oct 2024 22:05:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-dates-in-two-columns-and-then-sum-3rd-column/m-p/4255106#M168556</guid>
      <dc:creator>aduguid</dc:creator>
      <dc:date>2024-10-23T22:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: Compare dates in two columns and then sum 3rd column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-dates-in-two-columns-and-then-sum-3rd-column/m-p/4256647#M168648</link>
      <description>&lt;P&gt;Thank for your suggestion. But I got enclosed error. Any idea why?&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;</description>
      <pubDate>Thu, 24 Oct 2024 16:37:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-dates-in-two-columns-and-then-sum-3rd-column/m-p/4256647#M168648</guid>
      <dc:creator>meierli</dc:creator>
      <dc:date>2024-10-24T16:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: Compare dates in two columns and then sum 3rd column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-dates-in-two-columns-and-then-sum-3rd-column/m-p/4257252#M168675</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="693229" data-lia-user-login="meierli" class="lia-mention lia-mention-user"&gt;meierli&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much&amp;nbsp;aduguid&amp;nbsp;for your prompt reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MM CM = 
CALCULATE(
    SUM('Vendor Trend'[TOTAL MM]),
    FILTER(
        'Vendor Trend',
        'Vendor Trend'[CAP Date Paid] = 'Vendor Trend'[CAP Date Aff]
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MM CM = 
CALCULATE(
    SUM('Vendor Trend'[TOTAL MM]),
    FILTER(
        'Calendar',
        'Calendar'[Date] = 'Calendar_Dt Aff'[Date]
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.&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>Fri, 25 Oct 2024 02:48:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-dates-in-two-columns-and-then-sum-3rd-column/m-p/4257252#M168675</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-25T02:48:44Z</dc:date>
    </item>
  </channel>
</rss>

