<?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 How to calculate QTD and YTD based on MTD in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-QTD-and-YTD-based-on-MTD/m-p/2491694#M68622</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table with MTD value calculated everyday by ETL team. as a report developer, how to calcuate QTD and YTD by using the MTD value? There is no daily value in the fact table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MTD&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;QTD&amp;nbsp; &amp;nbsp; &amp;nbsp; YTD&lt;/P&gt;&lt;P&gt;2022-01-01&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;/P&gt;&lt;P&gt;2022-01-02&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;2022-01-30&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 100&lt;/P&gt;&lt;P&gt;2022-01-31&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 110&lt;/P&gt;&lt;P&gt;2022-02-01&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/P&gt;&lt;P&gt;2022-02-02&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;2022-02-27&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;70&lt;/P&gt;&lt;P&gt;2022-02-28&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;76&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;2022-03-01&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;7&lt;/P&gt;&lt;P&gt;2022-03-02&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;</description>
    <pubDate>Tue, 03 May 2022 18:54:21 GMT</pubDate>
    <dc:creator>PBI_RH</dc:creator>
    <dc:date>2022-05-03T18:54:21Z</dc:date>
    <item>
      <title>How to calculate QTD and YTD based on MTD</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-QTD-and-YTD-based-on-MTD/m-p/2491694#M68622</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table with MTD value calculated everyday by ETL team. as a report developer, how to calcuate QTD and YTD by using the MTD value? There is no daily value in the fact table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MTD&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;QTD&amp;nbsp; &amp;nbsp; &amp;nbsp; YTD&lt;/P&gt;&lt;P&gt;2022-01-01&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;/P&gt;&lt;P&gt;2022-01-02&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;2022-01-30&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 100&lt;/P&gt;&lt;P&gt;2022-01-31&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 110&lt;/P&gt;&lt;P&gt;2022-02-01&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/P&gt;&lt;P&gt;2022-02-02&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;2022-02-27&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;70&lt;/P&gt;&lt;P&gt;2022-02-28&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;76&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;2022-03-01&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;7&lt;/P&gt;&lt;P&gt;2022-03-02&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 18:54:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-QTD-and-YTD-based-on-MTD/m-p/2491694#M68622</guid>
      <dc:creator>PBI_RH</dc:creator>
      <dc:date>2022-05-03T18:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate QTD and YTD based on MTD</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-QTD-and-YTD-based-on-MTD/m-p/2491711#M68626</link>
      <description>&lt;P&gt;I'm struggling with this question, hope someone could help me out.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 19:03:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-QTD-and-YTD-based-on-MTD/m-p/2491711#M68626</guid>
      <dc:creator>PBI_RH</dc:creator>
      <dc:date>2022-05-03T19:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate QTD and YTD based on MTD</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-QTD-and-YTD-based-on-MTD/m-p/2491779#M68639</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="385603" data-lia-user-login="PBI_RH" class="lia-mention lia-mention-user"&gt;PBI_RH&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think one way to tackle this is to "undo" the summarization of the MTD column. On the base of the "raw" data it will be easy to just create QTD and YTD measures.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So here my try:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "DataColumn" has the following DAX:&lt;/P&gt;&lt;PRE&gt;DataColumn = 
'Table'[MTD] -
CALCULATE (
    MAX ( 'Table'[MTD] ),
    FILTER ( 
        'Table', 
        'Table'[Date] &amp;lt; EARLIER ( 'Table'[Date] ) &amp;amp;&amp;amp; MONTH ('Table'[Date] ) = MONTH ( EARLIER  ( 'Table'[Date] ) ) 
    )
) &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, I just created the following (quick) measures:&lt;/P&gt;&lt;PRE&gt;DataColumn QTD = 
IF(
	ISFILTERED('Table9'[Date]),
	ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),
	TOTALQTD(SUM('Table9'[DataColumn]), 'Table9'[Date].[Date])
)&lt;/PRE&gt;&lt;PRE&gt;DataColumn YTD = 
IF(
	ISFILTERED('Table9'[Date]),
	ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),
	TOTALYTD(SUM('Table9'[DataColumn]), 'Table9'[Date].[Date])
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know, if this solves your issue or if you get stuck somewhere on the way &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Tom&lt;BR /&gt;&lt;A href="https://www.tackytech.blog/" target="_blank"&gt;https://www.tackytech.blog/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.instagram.com/tackytechtom/" target="_blank"&gt;https://www.instagram.com/tackytechtom/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 19:51:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-QTD-and-YTD-based-on-MTD/m-p/2491779#M68639</guid>
      <dc:creator>tackytechtom</dc:creator>
      <dc:date>2022-05-03T19:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate QTD and YTD based on MTD</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-QTD-and-YTD-based-on-MTD/m-p/2491787#M68640</link>
      <description>&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;Unfortunately, my team has no control on the data side, I need to find a solution based on current data feed.&lt;/P&gt;&lt;P&gt;So I won't be able to get the daily value. &amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me try your solution to Reverse engineering the data column.&lt;/P&gt;&lt;P&gt;really appreciate your help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 19:58:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-QTD-and-YTD-based-on-MTD/m-p/2491787#M68640</guid>
      <dc:creator>PBI_RH</dc:creator>
      <dc:date>2022-05-03T19:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate QTD and YTD based on MTD</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-QTD-and-YTD-based-on-MTD/m-p/2491793#M68641</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="385603" data-lia-user-login="PBI_RH" class="lia-mention lia-mention-user"&gt;PBI_RH&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Data Column in my example above, reverse engineers the daily value for you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try it out by using the code for a calculated cvolumn and let me know if it work!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Tom&lt;BR /&gt;&lt;A href="https://www.tackytech.blog/" target="_blank"&gt;https://www.tackytech.blog/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.instagram.com/tackytechtom/" target="_blank"&gt;https://www.instagram.com/tackytechtom/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 20:00:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-QTD-and-YTD-based-on-MTD/m-p/2491793#M68641</guid>
      <dc:creator>tackytechtom</dc:creator>
      <dc:date>2022-05-03T20:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate QTD and YTD based on MTD</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-QTD-and-YTD-based-on-MTD/m-p/2493401#M68729</link>
      <description>&lt;P&gt;Hi Tom,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The DataColumn DAX returns errro, I will continue working on it later today.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thank you again for the help.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 12:35:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-QTD-and-YTD-based-on-MTD/m-p/2493401#M68729</guid>
      <dc:creator>PBI_RH</dc:creator>
      <dc:date>2022-05-04T12:35:57Z</dc:date>
    </item>
  </channel>
</rss>

