<?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 Getting year-to-date for weekly data in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Getting-year-to-date-for-weekly-data/m-p/1076166#M14105</link>
    <description>&lt;P&gt;I have been trying every version of year to date calculations I can find, but I keep just getting the current week in the field. Is the fact that it's weekly rather than monthly the issue? I'm a new Power Bi user, but I cannot find any tutorials anywhere to help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 06 May 2020 13:52:34 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-05-06T13:52:34Z</dc:date>
    <item>
      <title>Getting year-to-date for weekly data</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Getting-year-to-date-for-weekly-data/m-p/1076166#M14105</link>
      <description>&lt;P&gt;I have been trying every version of year to date calculations I can find, but I keep just getting the current week in the field. Is the fact that it's weekly rather than monthly the issue? I'm a new Power Bi user, but I cannot find any tutorials anywhere to help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 13:52:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Getting-year-to-date-for-weekly-data/m-p/1076166#M14105</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-06T13:52:34Z</dc:date>
    </item>
    <item>
      <title>Re: Getting year-to-date for weekly data</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Getting-year-to-date-for-weekly-data/m-p/1076208#M14106</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , you seem to try column, while it should be created as a measure&lt;/P&gt;
&lt;P&gt;Try these with Date table . All measures&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD((Table[Date]),"12/31"))
This Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD((ENDOFYEAR(Table[Date])),"12/31"))

Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd(Table[Date],-1,Year),"12/31"))
Last YTD complete Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd(Table[Date],-1,Year)),"12/31"))

Last to last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd(Table[Date],-2,Year),"12/31"))

Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd(Table[Date],-1,Year))
Year + 3 week behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd(dateadd(Table[Date],-1,Year),-21,Day))
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer : &lt;BR /&gt;&lt;A href="https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions" target="_blank"&gt;https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions&lt;/A&gt; &lt;BR /&gt;&lt;A href="https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi" target="_blank"&gt;https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/" target="_blank"&gt;https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;YTD QTY forced= &lt;BR /&gt;var _max = today()&lt;BR /&gt;return&lt;BR /&gt;calculate(Sum('order'[Qty]),DATESYTD('Date'[Date]),'Date'[Date]&amp;lt;=_max)&lt;BR /&gt;//calculate(TOTALYTD(Sum('order'[Qty]),'Date'[Date]),filter('Date','Date'[Date]&amp;lt;=_max))&lt;/P&gt;
&lt;P&gt;LYTD QTY forced= &lt;BR /&gt;var _max = date(year(today())-1,month(today()),day(today()))&lt;BR /&gt;return&lt;BR /&gt;CALCULATE(Sum('order'[Qty]),DATESYTD(dateadd('Date'[Date],-1,year)),'Date'[Date]&amp;lt;=_max)&lt;BR /&gt;//TOTALYTD(Sum('order'[Qty]),dateadd('Date'[Date],-1,year),'Date'[Date]&amp;lt;=_max)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184" target="_blank"&gt;https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 14:06:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Getting-year-to-date-for-weekly-data/m-p/1076208#M14106</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-05-06T14:06:12Z</dc:date>
    </item>
  </channel>
</rss>

