<?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: MTD calculated column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MTD-calculated-column/m-p/2249111#M54071</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could create&amp;nbsp;create an independent MTD column, please provide more details, then we can readjust your columns according to your needs.&lt;/P&gt;
&lt;P&gt;(1) &lt;STRONG&gt;a sample file&lt;/STRONG&gt;, you can replace raw data with bogus data to protect your privacy.&lt;/P&gt;
&lt;P&gt;(2) &lt;STRONG&gt;or provide some sample data&lt;/STRONG&gt; that fully covers your issue/question&lt;/P&gt;
&lt;P&gt;(3) &lt;STRONG&gt;give your expected result&lt;/STRONG&gt; based on the sample you provide&lt;/P&gt;
&lt;P&gt;(Kindly note: Please ensure the data in sample is concise and representative)&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Tang&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;, please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Tue, 21 Dec 2021 06:26:38 GMT</pubDate>
    <dc:creator>v-xiaotang</dc:creator>
    <dc:date>2021-12-21T06:26:38Z</dc:date>
    <item>
      <title>MTD calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MTD-calculated-column/m-p/2244877#M53847</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have source data amounts presented in year-to-date (IBM Cognos) and are trying to create a calculated column in the fact table that is presenting the month-to-date value. Example below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Although I managed to calulate this using below DAX formula have I not found a way of calculating a month-to-date value when no year-to-date value has been reported in one period. Example in the data set above are revenues coded on cost center (DIM3) "4112" in the beginning of the year although changed to "4113" in June. The correct MTD value for June should have been -210 (=0-210) on DIM3 "4112" and +290 (=290-0) on DIM3 "4113" (i.e. together 40). However since Im missing a row with zero YTD amount for DIM4112 in June are my formula not calculating that row and end up showing +290 in total for the month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any guidance on how to solve this challenge is highly appreciated!&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Alexander&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;AmountMTD =&lt;BR /&gt;VAR _Dim1 = 'DW V_FactControllerLedgerExpanded'[DIM1]&lt;BR /&gt;VAR _Dim2 = 'DW V_FactControllerLedgerExpanded'[DIM2]&lt;BR /&gt;VAR _Dim3 = 'DW V_FactControllerLedgerExpanded'[DIM3]&lt;BR /&gt;VAR _Acc = 'DW V_FactControllerLedgerExpanded'[Account]&lt;/P&gt;&lt;P&gt;VAR _PrevPeriod = DATEADD('DW V_FactControllerLedgerExpanded'[Date], -1, MONTH)&lt;/P&gt;&lt;P&gt;VAR _PrevValue = LOOKUPVALUE('DW V_FactControllerLedgerExpanded'[AmountYTD],&lt;BR /&gt;'DW V_FactControllerLedgerExpanded'[DIM1], _Dim1,&lt;BR /&gt;'DW V_FactControllerLedgerExpanded'[DIM2], _Dim2,&lt;BR /&gt;'DW V_FactControllerLedgerExpanded'[DIM3], _Dim3,&lt;BR /&gt;'DW V_FactControllerLedgerExpanded'[Account], _Acc,&lt;BR /&gt;'DW V_FactControllerLedgerExpanded'[Date], _PrevPeriod)&lt;/P&gt;&lt;P&gt;VAR _MTDvalue = 'DW V_FactControllerLedgerExpanded'[AmountYTD] - _PrevValue&lt;/P&gt;&lt;P&gt;RETURN&lt;BR /&gt;IF(MONTH('DW V_FactControllerLedgerExpanded'[Date]) = 1, 'DW V_FactControllerLedgerExpanded'[AmountYTD], _MTDvalue)&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 17 Dec 2021 14:56:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MTD-calculated-column/m-p/2244877#M53847</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-17T14:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: MTD calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MTD-calculated-column/m-p/2245156#M53865</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , A new column &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;New column = &lt;BR /&gt;[YTD] = maxx(filter(Table, [Date] = earlier([Date])-1 &amp;amp;&amp;amp; [Account] = earlier([Account] ) &lt;BR /&gt;&amp;amp;&amp;amp; [DIM1] = earlier([DIM1] ) &lt;BR /&gt;&amp;amp;&amp;amp; [DIM2] = earlier([DIM2] ) ),[YTD])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add and remove equal joins as per need&lt;/P&gt;</description>
      <pubDate>Fri, 17 Dec 2021 17:09:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MTD-calculated-column/m-p/2245156#M53865</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-12-17T17:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: MTD calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MTD-calculated-column/m-p/2249111#M54071</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could create&amp;nbsp;create an independent MTD column, please provide more details, then we can readjust your columns according to your needs.&lt;/P&gt;
&lt;P&gt;(1) &lt;STRONG&gt;a sample file&lt;/STRONG&gt;, you can replace raw data with bogus data to protect your privacy.&lt;/P&gt;
&lt;P&gt;(2) &lt;STRONG&gt;or provide some sample data&lt;/STRONG&gt; that fully covers your issue/question&lt;/P&gt;
&lt;P&gt;(3) &lt;STRONG&gt;give your expected result&lt;/STRONG&gt; based on the sample you provide&lt;/P&gt;
&lt;P&gt;(Kindly note: Please ensure the data in sample is concise and representative)&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Tang&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;, please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 06:26:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MTD-calculated-column/m-p/2249111#M54071</guid>
      <dc:creator>v-xiaotang</dc:creator>
      <dc:date>2021-12-21T06:26:38Z</dc:date>
    </item>
  </channel>
</rss>

