<?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 Dax calculation for sales attained within fiscal period in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-calculation-for-sales-attained-within-fiscal-period/m-p/2471382#M67367</link>
    <description>&lt;P&gt;Hello! I am needing a DAX formula that will calculate the percentage of goal attained for any given day within a period. For example, if we are 65% through the period and our goal for the period is 15M and we are currently at 10M in sales, how do I calculate the percentage of goal attained for that 65% of the period. At 10M in sales have we achieved 100% in relation to our overall goal of 15M being 65% through the period?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Fri, 22 Apr 2022 11:29:55 GMT</pubDate>
    <dc:creator>mpeabody</dc:creator>
    <dc:date>2022-04-22T11:29:55Z</dc:date>
    <item>
      <title>Dax calculation for sales attained within fiscal period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-calculation-for-sales-attained-within-fiscal-period/m-p/2471382#M67367</link>
      <description>&lt;P&gt;Hello! I am needing a DAX formula that will calculate the percentage of goal attained for any given day within a period. For example, if we are 65% through the period and our goal for the period is 15M and we are currently at 10M in sales, how do I calculate the percentage of goal attained for that 65% of the period. At 10M in sales have we achieved 100% in relation to our overall goal of 15M being 65% through the period?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 11:29:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-calculation-for-sales-attained-within-fiscal-period/m-p/2471382#M67367</guid>
      <dc:creator>mpeabody</dc:creator>
      <dc:date>2022-04-22T11:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dax calculation for sales attained within fiscal period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-calculation-for-sales-attained-within-fiscal-period/m-p/2472282#M67371</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;Usually you will have a forecast or goal table.(phyiscal or virtual) It also depends on the grain of your forecast. Do you have an annual number that needs to be spread over each day, or perhaps a month goal and you would then spilt that up over the days in each month you are forecasting for.&lt;/P&gt;&lt;P&gt;Assumingyour sales comes in by day in a different table you can do a simple sum of sales and a sum of forecast and working in conjunction with a date table, the to date comparisons are not hard to do.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have a table with each month and a total budget for each month, as a separate table e.g.&lt;/P&gt;&lt;P&gt;Month&amp;nbsp; &amp;nbsp;Forecast Amt&lt;/P&gt;&lt;P&gt;Jan&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;200&lt;/P&gt;&lt;P&gt;Feb&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 300&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use this allocation DAX to break your monthly forecasts into daily amounts. Then you just sum then or do a YTD for both actual values vs. budgeted vales.&lt;/P&gt;&lt;P&gt;Here is a way to allocate a monthly budget to each day. *Note. You have a separate Dates table with all the dates, marked as a date table and connected to your fact table with sales in it. Dates[Date] (one side) is usually connected in a relationship to SalesTable[OrderDate] (many side) as one example.&lt;/P&gt;&lt;P&gt;Here's one allocation measure for spreading out the monthly budget. I hope this helps!&lt;/P&gt;&lt;P&gt;Budget Allocated =&lt;/P&gt;&lt;P&gt;SUMX (&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -- Summarize Dates by Year/Month &amp;amp; Days in Month&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUMMARIZE (&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dates,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dates[Year Month],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dates[Days In Month]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -- For each Year/Month get # days in current filter context for that Year/Month&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; VAR DayCount =&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CALCULATE ( COUNTROWS ( Dates ) )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -- Budget value for the entire month&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; VAR BudgetValueMonth =&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CALCULATE (&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUM ( Budget[Budget Value] ),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ALLEXCEPT ( Dates, Dates[Year Month] )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -- Budget value allocated to required number of days (DayCount)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; VAR BudgetValueAllocated =&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BudgetValueMonth * DayCount / Dates[Days In Month]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RETURN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BudgetValueAllocated&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 19:56:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-calculation-for-sales-attained-within-fiscal-period/m-p/2472282#M67371</guid>
      <dc:creator>Whitewater100</dc:creator>
      <dc:date>2022-04-22T19:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Dax calculation for sales attained within fiscal period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-calculation-for-sales-attained-within-fiscal-period/m-p/2472294#M67377</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;To answer your question on % of goal.&lt;/P&gt;&lt;P&gt;1. Total Sales = SUM(SalesTable[Sales Amt])&lt;/P&gt;&lt;P&gt;2. Total Budget = SUM(Budget[Budget Amt])&lt;/P&gt;&lt;P&gt;3. % of Goal = DIVIDE([Total Sales], [Total Budget])&amp;nbsp; Foramt as %.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 20:12:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-calculation-for-sales-attained-within-fiscal-period/m-p/2472294#M67377</guid>
      <dc:creator>Whitewater100</dc:creator>
      <dc:date>2022-04-22T20:12:15Z</dc:date>
    </item>
  </channel>
</rss>

