<?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: Calculate MTD Values from two disconnected Tables. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-MTD-Values-from-two-disconnected-Tables/m-p/4415276#M175331</link>
    <description>&lt;P&gt;It worked, Thank You&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp; and&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="202311" data-lia-user-login="BeaBF" class="lia-mention lia-mention-user"&gt;BeaBF&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Feb 2025 07:51:33 GMT</pubDate>
    <dc:creator>DeepakSharma_01</dc:creator>
    <dc:date>2025-02-18T07:51:33Z</dc:date>
    <item>
      <title>Calculate MTD Values from two disconnected Tables.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-MTD-Values-from-two-disconnected-Tables/m-p/4411291#M175192</link>
      <description>&lt;P&gt;Hi Everyone,&lt;BR /&gt;I have a budget table, which is having total budget of the month on last day of month.&lt;/P&gt;&lt;P&gt;Like-&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and another table is Date Table, and I want to allocate same value for all date of the month like MTD.&lt;BR /&gt;I tried with TREATAS Dax funtion but result is not what I needed,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;M_BUDGET_MTD_SALES_Test = &lt;BR /&gt;VAR CurrentDate = MAX(DIM_DATE[DATE]) &lt;BR /&gt;VAR Month_start = DATE(YEAR(CurrentDate), MONTH(CurrentDate), 1) &lt;BR /&gt;VAR Month_end = EOMONTH(CurrentDate, 0) &lt;BR /&gt;VAR TotalMonthBudget = &lt;BR /&gt;TOTALMTD(CALCULATE(&lt;BR /&gt;SUM(BUDGET_FORECAST[BUDGET]), &lt;BR /&gt;TREATAS(&lt;BR /&gt;VALUES(DIM_DATE[DATE]), &lt;BR /&gt;BUDGET_FORECAST[MONTH] &lt;BR /&gt;)&lt;BR /&gt;), DIM_DATE[DATE])&lt;BR /&gt;&lt;BR /&gt;RETURN&lt;BR /&gt;TotalMonthBudget&lt;/PRE&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;I want the same total for each date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Deepak&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2025 14:49:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-MTD-Values-from-two-disconnected-Tables/m-p/4411291#M175192</guid>
      <dc:creator>DeepakSharma_01</dc:creator>
      <dc:date>2025-02-14T14:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate MTD Values from two disconnected Tables.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-MTD-Values-from-two-disconnected-Tables/m-p/4411304#M175194</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="852275" data-lia-user-login="DeepakSharma_01" class="lia-mention lia-mention-user"&gt;DeepakSharma_01&lt;/a&gt;&amp;nbsp;Hi!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need a measure that assigns the same total monthly budget to each day of that month. You can achieve this with the following approach:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;M_BUDGET_MTD_SALES_Test =&lt;BR /&gt;VAR CurrentDate = MAX(DIM_DATE[DATE])&lt;BR /&gt;VAR MonthStart = DATE(YEAR(CurrentDate), MONTH(CurrentDate), 1)&lt;BR /&gt;VAR MonthEnd = EOMONTH(CurrentDate, 0)&lt;/P&gt;
&lt;P&gt;VAR TotalMonthBudget =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;SUM(BUDGET_FORECAST[BUDGET]),&lt;BR /&gt;BUDGET_FORECAST[MONTH] = MonthEnd&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;RETURN&lt;BR /&gt;TotalMonthBudget&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BBF&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2025 14:57:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-MTD-Values-from-two-disconnected-Tables/m-p/4411304#M175194</guid>
      <dc:creator>BeaBF</dc:creator>
      <dc:date>2025-02-14T14:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate MTD Values from two disconnected Tables.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-MTD-Values-from-two-disconnected-Tables/m-p/4413292#M175262</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="852275" data-lia-user-login="DeepakSharma_01" class="lia-mention lia-mention-user"&gt;DeepakSharma_01&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your solution is great, BeaBF&amp;nbsp;. It worked like a charm! Here I have another idea in mind, and I would like to share it for reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your requirement is to calculate the budgeted values assigned on a monthly basis (MTD) and assign the same values for each day in the date table, right?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my test data:&lt;/P&gt;
&lt;TABLE&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;MONTH&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;BUDGET&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;2025-01-31&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;3000&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;2025-02-28&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;2000&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;2025-03-31&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;1000&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;2025-04-30&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;5000&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I created a date table:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Modify your measure as follows.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;M_BUDGET_MTD_SALES_Test = 
VAR CurrentDate = MAX(DIM_DATE[DATE]) 
VAR Month_start = DATE(YEAR(CurrentDate), MONTH(CurrentDate), 1) 
VAR Month_end = EOMONTH(CurrentDate, 0)
VAR TotalMonthBudget = 
CALCULATE(
    SUM(BUDGET_FORECAST[BUDGET]),
    FILTER(
        BUDGET_FORECAST,
        BUDGET_FORECAST[MONTH] = EOMONTH(CurrentDate, 0)
    )
)

RETURN
IF(
    CurrentDate &amp;gt;= Month_start &amp;amp;&amp;amp; CurrentDate &amp;lt;= Month_end,
    TotalMonthBudget,
    BLANK()
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The final page visualization is shown below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The pbix file is attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have any other questions please feel free to contact me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Yang&lt;BR /&gt;Community Support Team&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is any 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;&amp;nbsp;to help the other members find it more quickly.&lt;BR /&gt;If I misunderstand your needs or you still have problems on it, please feel free to let us know.&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Thanks a lot!&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2025 07:44:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-MTD-Values-from-two-disconnected-Tables/m-p/4413292#M175262</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-02-17T07:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate MTD Values from two disconnected Tables.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-MTD-Values-from-two-disconnected-Tables/m-p/4414957#M175318</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="202311" data-lia-user-login="BeaBF" class="lia-mention lia-mention-user"&gt;BeaBF&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;I tried solution of yours but getting random values in cell but total is correct, It is happing because of having indirect relationship between date table &amp;amp; budget table. Is there any way to temporarily ignore existing relationship.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 05:20:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-MTD-Values-from-two-disconnected-Tables/m-p/4414957#M175318</guid>
      <dc:creator>DeepakSharma_01</dc:creator>
      <dc:date>2025-02-18T05:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate MTD Values from two disconnected Tables.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-MTD-Values-from-two-disconnected-Tables/m-p/4415048#M175324</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="852275" data-lia-user-login="DeepakSharma_01" class="lia-mention lia-mention-user"&gt;DeepakSharma_01&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the solution I originally provided, there was no relationship between the date table and the budget table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To reproduce your problem I created a relationship between the two tables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The relationship between two tables can be ignored by using the REMOVEFILTERS function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The modified syntax is as follows:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;M_BUDGET_MTD_SALES_Test = 
VAR CurrentDate = MAX(DIM_DATE[DATE])
VAR Month_start = DATE(YEAR(CurrentDate), MONTH(CurrentDate), 1)
VAR Month_end = EOMONTH(CurrentDate, 0)
VAR TotalMonthBudget = 
CALCULATE(
    SUM(BUDGET_FORECAST[BUDGET]),
    REMOVEFILTERS(DIM_DATE), 
    BUDGET_FORECAST[MONTH] = EOMONTH(CurrentDate, 0)
)
RETURN
IF(
    CurrentDate &amp;gt;= Month_start &amp;amp;&amp;amp; CurrentDate &amp;lt;= Month_end,
    TotalMonthBudget,
    BLANK()
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The final page visualization is shown below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it hasn't been resolved, please provide a Power BI Desktop file in progress (with sensitive information removed) that fully covers your issue or question in a usable format (not a screenshot). You can upload the PBIX file to a cloud storage service such as OneDrive, Google Drive (set up public access), SharePoint, or a Github repository, and then share the URL of the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The pbix file is attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have any other questions please feel free to contact me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Yang&lt;BR /&gt;Community Support Team&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is any 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;&amp;nbsp;to help the other members find it more quickly.&lt;BR /&gt;If I misunderstand your needs or you still have problems on it, please feel free to let us know.&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Thanks a lot!&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 06:14:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-MTD-Values-from-two-disconnected-Tables/m-p/4415048#M175324</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-02-18T06:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate MTD Values from two disconnected Tables.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-MTD-Values-from-two-disconnected-Tables/m-p/4415276#M175331</link>
      <description>&lt;P&gt;It worked, Thank You&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp; and&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="202311" data-lia-user-login="BeaBF" class="lia-mention lia-mention-user"&gt;BeaBF&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 07:51:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-MTD-Values-from-two-disconnected-Tables/m-p/4415276#M175331</guid>
      <dc:creator>DeepakSharma_01</dc:creator>
      <dc:date>2025-02-18T07:51:33Z</dc:date>
    </item>
  </channel>
</rss>

