<?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: YTD Prorated Target/Budget -  Dax formula in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YTD-Prorated-Target-Budget-Dax-formula/m-p/3227459#M118244</link>
    <description>&lt;P&gt;I think it should work if you put a relative date filter on the visual. Just set 'Date'[Date] to be in the current, or last, 1 day. Depends on whether you want to include today or end at yesterday.&lt;/P&gt;</description>
    <pubDate>Tue, 09 May 2023 15:43:46 GMT</pubDate>
    <dc:creator>johnt75</dc:creator>
    <dc:date>2023-05-09T15:43:46Z</dc:date>
    <item>
      <title>YTD Prorated Target/Budget -  Dax formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YTD-Prorated-Target-Budget-Dax-formula/m-p/3227386#M118238</link>
      <description>&lt;P&gt;Hello!&amp;nbsp;&lt;BR /&gt;I have a Target table by Monthly grain in the following format which has a relationship with Date table via BridgeMonthYear table to resolve many to many relationship.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;MonthYear&lt;/TD&gt;&lt;TD&gt;Target&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jan-23&lt;/TD&gt;&lt;TD&gt;64&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Feb-23&lt;/TD&gt;&lt;TD&gt;57&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Mar-23&lt;/TD&gt;&lt;TD&gt;32&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Apr-23&lt;/TD&gt;&lt;TD&gt;58&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;May-23&lt;/TD&gt;&lt;TD&gt;52&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jun-23&lt;/TD&gt;&lt;TD&gt;56&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jul-23&lt;/TD&gt;&lt;TD&gt;58&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Aug-23&lt;/TD&gt;&lt;TD&gt;45&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Sep-23&lt;/TD&gt;&lt;TD&gt;56&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Oct-23&lt;/TD&gt;&lt;TD&gt;49&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Nov-23&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Dec-23&lt;/TD&gt;&lt;TD&gt;48&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I calculate Prorated Target as&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Total Target Prorated = 
VAR DayInContext = COUNTROWS(D_Calendar)
VAR DaysInMonth = CALCULATE(COUNTROWS(D_Calendar),ALL(D_Calendar),VALUES(D_Calendar[MonthYear]))
VAR MonthlyTarget = CALCULATE([Total Target])
Var Result = DIVIDE( DayInContext,DaysInMonth,0) * MonthlyTarget
RETURN
Result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;I Calculate YTD Target as&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;YTD Target = CALCULATE(
               [Total Target Prorated],
                  CALCULATETABLE(
                    DATESYTD(D_Calendar[Date]),
                    D_Calendar[FutureDate]=""Past""
                  )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;YTD Target is not showing up expected result since the YTD Target performs following calculation at its core-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Total Target (till end of May) * (Day In Context/DayInMonth) 

From Table above
= 263 * (128/151) 
= 222.94
Where,
263 = Total Target as of May end. 
128 = Days so far in the year
151 = Day count till end of May&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a problem because it is prorating target for each day so far in the year.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Instead, I want it to perform calculation like this for YTD Target&lt;BR /&gt;&lt;STRONG&gt;Check if month has passed if yes then Total Target for that month(s) + prorated Target for the Month in Progress&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;Which would translate to following for the table posted above&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;YTD Prorated Target = 

Jan Target + Feb Target + Mar Target + Apr Target + ( [May Target] * 8/31)

Where 8 = days in May so far 
&amp;amp; 31 = Total days in May

so the number would be, 
= 64 + 57 + 32 + 58 + (52 * 8/31)
= 224.42&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The results are quite different by both methods (222 Vs 224). In PBI report I want to replicate logic/method 2 for YTD prorated Targets.&amp;nbsp;How should I &lt;STRONG&gt;modify the Prorated Target or YTD Target formula&lt;/STRONG&gt; to replicate method 2 logic?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 15:13:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YTD-Prorated-Target-Budget-Dax-formula/m-p/3227386#M118238</guid>
      <dc:creator>BILearner</dc:creator>
      <dc:date>2023-05-09T15:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: YTD Prorated Target/Budget -  Dax formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YTD-Prorated-Target-Budget-Dax-formula/m-p/3227423#M118241</link>
      <description>&lt;P&gt;I think you can use&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;YTD Target =
SUMX (
    CALCULATETABLE (
        DATESYTD ( D_Calendar[Date] ),
        D_Calendar[FutureDate] = "Past"
    ),
    [Total Target Prorated]
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 09 May 2023 15:29:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YTD-Prorated-Target-Budget-Dax-formula/m-p/3227423#M118241</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-05-09T15:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: YTD Prorated Target/Budget -  Dax formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YTD-Prorated-Target-Budget-Dax-formula/m-p/3227451#M118242</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;for you recommendation! I think this will work.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Do you think the Daily Proration Formula can be adjusted in any way? I need to throw it in a card visual and the prorated total is not showing up as it should. I am trying to avoid creating extra calculated columns or summarized tables.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 15:39:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YTD-Prorated-Target-Budget-Dax-formula/m-p/3227451#M118242</guid>
      <dc:creator>BILearner</dc:creator>
      <dc:date>2023-05-09T15:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: YTD Prorated Target/Budget -  Dax formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YTD-Prorated-Target-Budget-Dax-formula/m-p/3227459#M118244</link>
      <description>&lt;P&gt;I think it should work if you put a relative date filter on the visual. Just set 'Date'[Date] to be in the current, or last, 1 day. Depends on whether you want to include today or end at yesterday.&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 15:43:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YTD-Prorated-Target-Budget-Dax-formula/m-p/3227459#M118244</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-05-09T15:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: YTD Prorated Target/Budget -  Dax formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YTD-Prorated-Target-Budget-Dax-formula/m-p/3227537#M118257</link>
      <description>&lt;P&gt;Relative date filter has no impact on Prorated Target. I think the Prorated Target formula needs to be changed for iteration. I tried to do that and got weird results. It needs to be similar to what you've done for YTD Target.&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 16:32:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YTD-Prorated-Target-Budget-Dax-formula/m-p/3227537#M118257</guid>
      <dc:creator>BILearner</dc:creator>
      <dc:date>2023-05-09T16:32:48Z</dc:date>
    </item>
  </channel>
</rss>

