<?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: YTD and PYTD questions in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-YTD-and-PYTD-questions/m-p/109497#M190</link>
    <description>&lt;P&gt;I have a dashboard with a table view that has categories of crime along the left side and columns of totals for YTD figures and Previous YTD figures. On the current year or monthly totals the figures are correct. If it is the first few days in January I get correct numbers for the current month, but on all previous time calculations I get the totals for the entire month and the formulas do not respect the partial days in the current month. For instance,.... if I run the report for the first 5 days in January I would like the previous calculations for the year prior to respect only those first 5 days in January as well. Also I cannot share the model for obvious reasons. Any help would be appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My YTD DAX:&lt;/P&gt;&lt;P&gt;YTD = CALCULATE(DISTINCTCOUNT(lwmain[lwmainid]),DATESYTD(MasterDate[Date]))&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My PYTD DAX:&lt;/P&gt;&lt;P&gt;LYTD = CALCULATE(DISTINCTCOUNT(lwmain[lwmainid]), DATEADD(DATESYTD(MasterDate[Date]),-1,YEAR))&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My MTD DAX:&lt;/P&gt;&lt;P&gt;MTD = CALCULATE(DISTINCTCOUNT(lwmain[lwmainid]),DATESMTD(MasterDate[Date]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My PMTD DAX:&lt;/P&gt;&lt;P&gt;LYMTD = CALCULATE(DISTINCTCOUNT(lwmain[lwmainid]),DATEADD(DATESMTD(MasterDate[Date]), -1,YEAR))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jan 2017 15:45:18 GMT</pubDate>
    <dc:creator>dkel6177</dc:creator>
    <dc:date>2017-01-05T15:45:18Z</dc:date>
    <item>
      <title>DAX: YTD and PYTD questions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-YTD-and-PYTD-questions/m-p/109497#M190</link>
      <description>&lt;P&gt;I have a dashboard with a table view that has categories of crime along the left side and columns of totals for YTD figures and Previous YTD figures. On the current year or monthly totals the figures are correct. If it is the first few days in January I get correct numbers for the current month, but on all previous time calculations I get the totals for the entire month and the formulas do not respect the partial days in the current month. For instance,.... if I run the report for the first 5 days in January I would like the previous calculations for the year prior to respect only those first 5 days in January as well. Also I cannot share the model for obvious reasons. Any help would be appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My YTD DAX:&lt;/P&gt;&lt;P&gt;YTD = CALCULATE(DISTINCTCOUNT(lwmain[lwmainid]),DATESYTD(MasterDate[Date]))&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My PYTD DAX:&lt;/P&gt;&lt;P&gt;LYTD = CALCULATE(DISTINCTCOUNT(lwmain[lwmainid]), DATEADD(DATESYTD(MasterDate[Date]),-1,YEAR))&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My MTD DAX:&lt;/P&gt;&lt;P&gt;MTD = CALCULATE(DISTINCTCOUNT(lwmain[lwmainid]),DATESMTD(MasterDate[Date]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My PMTD DAX:&lt;/P&gt;&lt;P&gt;LYMTD = CALCULATE(DISTINCTCOUNT(lwmain[lwmainid]),DATEADD(DATESMTD(MasterDate[Date]), -1,YEAR))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 15:45:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-YTD-and-PYTD-questions/m-p/109497#M190</guid>
      <dc:creator>dkel6177</dc:creator>
      <dc:date>2017-01-05T15:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: DAX: YTD and PYTD questions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-YTD-and-PYTD-questions/m-p/116583#M200</link>
      <description>&lt;P&gt;Use of&amp;nbsp;&lt;SPAN&gt;DATESBETWEEN and&amp;nbsp;EDATE functions should resolve this, please check this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;LYMTD = CALCULATE(DISTINCTCOUNT(lwmain[lwmainid]),DATESBETWEEN(MasterDate[Date], EDATE(STARTOFMONTH(MasterDate[Date]),-12),&lt;BR /&gt;EDATE(TODAY(),-12)&lt;BR /&gt;))&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2017 13:59:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-YTD-and-PYTD-questions/m-p/116583#M200</guid>
      <dc:creator>Ssingh</dc:creator>
      <dc:date>2017-01-20T13:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: DAX: YTD and PYTD questions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-YTD-and-PYTD-questions/m-p/117196#M208</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="9410" data-lia-user-login="dkel6177" class="lia-mention lia-mention-user"&gt;dkel6177&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please check out the link&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.powerbi.com/t5/Desktop/How-to-display-sales-YTD-and-sales-last-YTD-over-years/m-p/106627#M44711" target="_blank"&gt;http://community.powerbi.com/t5/Desktop/How-to-display-sales-YTD-and-sales-last-YTD-over-years/m-p/106627#M44711&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solves your issue please give KUDOS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CheenuSing&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2017 05:16:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-YTD-and-PYTD-questions/m-p/117196#M208</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-23T05:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: DAX: YTD and PYTD questions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-YTD-and-PYTD-questions/m-p/140701#M267</link>
      <description>&lt;P&gt;How did you get the status&amp;nbsp;icons for KP_ and K_ columns?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2017 22:16:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-YTD-and-PYTD-questions/m-p/140701#M267</guid>
      <dc:creator>AlecMaly</dc:creator>
      <dc:date>2017-03-10T22:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: DAX: YTD and PYTD questions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-YTD-and-PYTD-questions/m-p/297175#M299</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="23546" data-lia-user-login="AlecMaly" class="lia-mention lia-mention-user"&gt;AlecMaly&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Take a look at this tutorial that explains how to do it!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/SSRS-like-traffic-light-indicators-in-Power-BI/ba-p/165947" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/SSRS-like-traffic-light-indicators-in-Power-BI/ba-p/165947&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 12:59:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-YTD-and-PYTD-questions/m-p/297175#M299</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-06T12:59:38Z</dc:date>
    </item>
  </channel>
</rss>

