<?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 TOTAL YTD problem in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/DAX-TOTAL-YTD-problem/m-p/189289#M6016</link>
    <description>&lt;P&gt;Hi there, trying to solve what should seem like a fairly straightforward reporting/visual problem.&amp;nbsp; I am trying to compare LY Total Sales to CY Total Sales using a line chart by month&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that when I use am expression like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example1:&lt;/P&gt;&lt;P&gt;YTD Sales = TOTALYTD('fact'[Total Sales],'DateDimension'[Date])&lt;/P&gt;&lt;P&gt;I get blank results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oddly if I use :&lt;/P&gt;&lt;P&gt;Example 2&lt;/P&gt;&lt;P&gt;YTD Sales = TOTALYTD('fact'[Total Sales], 'fact'[DateOfSale])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get what appear to be good result for CY,&amp;nbsp;but some rason now LY has a big gap in it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My model is pretty standard with a one to many dimDate -&amp;gt;facttable design joined on date.&amp;nbsp; Every example I have looked at seems to say my first example is correct, however it does not work at all.&amp;nbsp; The second example, I typically don't do and would expect it to be a little odd anyway, but not sure why example one is not working.&amp;nbsp; I have done this type of YTD expression before and I feel it might be something else besides the expression, maybe a relationship, data type, some other issue.&amp;nbsp; Could be I am just really tired lol.&amp;nbsp; But I should be able to name the Date field from the Date dimension and this would work.&amp;nbsp; I have never had to call the date field from the fact table itself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway any feedback or advice would be great.&amp;nbsp; Been banging my head against this one all day and not sure what I am doing wrong or what setting I might be missing.&amp;nbsp; TY!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Results of Example 1 expression( YTD TOTAL is completely missing)&lt;/P&gt;&lt;P&gt;YTD Sales = TOTALYTD('fact'[Total Sales],'DateDimension'[Date])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YTD completely missing" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/44514i2258D20DBD5DC983/image-size/large?v=v2&amp;amp;px=999" role="button" title="missYTD.JPG" alt="YTD completely missing" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;YTD completely missing&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example 2&lt;/P&gt;&lt;P&gt;YTD Sales = TOTALYTD('fact'[Total Sales], 'fact'[DateOfSale])&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LY vs YTD.JPG" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/44515i00B20F84AF618242/image-size/large?v=v2&amp;amp;px=999" role="button" title="LY vs YTD.JPG" alt="LY vs YTD.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jun 2017 01:07:35 GMT</pubDate>
    <dc:creator>Gregs138</dc:creator>
    <dc:date>2017-06-07T01:07:35Z</dc:date>
    <item>
      <title>DAX TOTAL YTD problem</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/DAX-TOTAL-YTD-problem/m-p/189289#M6016</link>
      <description>&lt;P&gt;Hi there, trying to solve what should seem like a fairly straightforward reporting/visual problem.&amp;nbsp; I am trying to compare LY Total Sales to CY Total Sales using a line chart by month&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that when I use am expression like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example1:&lt;/P&gt;&lt;P&gt;YTD Sales = TOTALYTD('fact'[Total Sales],'DateDimension'[Date])&lt;/P&gt;&lt;P&gt;I get blank results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oddly if I use :&lt;/P&gt;&lt;P&gt;Example 2&lt;/P&gt;&lt;P&gt;YTD Sales = TOTALYTD('fact'[Total Sales], 'fact'[DateOfSale])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get what appear to be good result for CY,&amp;nbsp;but some rason now LY has a big gap in it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My model is pretty standard with a one to many dimDate -&amp;gt;facttable design joined on date.&amp;nbsp; Every example I have looked at seems to say my first example is correct, however it does not work at all.&amp;nbsp; The second example, I typically don't do and would expect it to be a little odd anyway, but not sure why example one is not working.&amp;nbsp; I have done this type of YTD expression before and I feel it might be something else besides the expression, maybe a relationship, data type, some other issue.&amp;nbsp; Could be I am just really tired lol.&amp;nbsp; But I should be able to name the Date field from the Date dimension and this would work.&amp;nbsp; I have never had to call the date field from the fact table itself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway any feedback or advice would be great.&amp;nbsp; Been banging my head against this one all day and not sure what I am doing wrong or what setting I might be missing.&amp;nbsp; TY!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Results of Example 1 expression( YTD TOTAL is completely missing)&lt;/P&gt;&lt;P&gt;YTD Sales = TOTALYTD('fact'[Total Sales],'DateDimension'[Date])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YTD completely missing" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/44514i2258D20DBD5DC983/image-size/large?v=v2&amp;amp;px=999" role="button" title="missYTD.JPG" alt="YTD completely missing" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;YTD completely missing&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example 2&lt;/P&gt;&lt;P&gt;YTD Sales = TOTALYTD('fact'[Total Sales], 'fact'[DateOfSale])&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LY vs YTD.JPG" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/44515i00B20F84AF618242/image-size/large?v=v2&amp;amp;px=999" role="button" title="LY vs YTD.JPG" alt="LY vs YTD.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2017 01:07:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/DAX-TOTAL-YTD-problem/m-p/189289#M6016</guid>
      <dc:creator>Gregs138</dc:creator>
      <dc:date>2017-06-07T01:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: DAX TOTAL YTD problem</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/DAX-TOTAL-YTD-problem/m-p/190758#M6058</link>
      <description>&lt;P&gt;Just some follow up on this for anyone that is having the same problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The solution ended up being to add a filter to the YTD() function.&amp;nbsp; It is stated that it is an optional filter, however it seems to be rather necessary or else your YTDTotal will carry the last total(today)&amp;nbsp;until the end of the year.&amp;nbsp; This is a little buggy imo but manageble with the custom filter parameter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here was my fix:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;YTD Sales = TOTALYTD(SUM(SalesTable[SalesAmount]),'Order Date'[Date],filter('Order Date',[Date] &amp;lt; NOW()))&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2017 18:55:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/DAX-TOTAL-YTD-problem/m-p/190758#M6058</guid>
      <dc:creator>Gregs138</dc:creator>
      <dc:date>2017-06-08T18:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: DAX TOTAL YTD problem</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/DAX-TOTAL-YTD-problem/m-p/191079#M6071</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/773"&gt;@Gregs138&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Just some follow up on this for anyone that is having the same problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The solution ended up being to add a filter to the YTD() function.&amp;nbsp; It is stated that it is an optional filter, however it seems to be rather necessary or else your YTDTotal will carry the last total(today)&amp;nbsp;until the end of the year.&amp;nbsp; This is a little buggy imo but manageble with the custom filter parameter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here was my fix:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;YTD Sales = TOTALYTD(SUM(SalesTable[SalesAmount]),'Order Date'[Date],filter('Order Date',[Date] &amp;lt; NOW()))&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/773"&gt;@Gregs138&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Thanks for your sharing. You can mark your reply as solution to close this thread. People who may have the same question can benefit from the solution.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 07:19:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/DAX-TOTAL-YTD-problem/m-p/191079#M6071</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-06-09T07:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: DAX TOTAL YTD problem</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/DAX-TOTAL-YTD-problem/m-p/384971#M11436</link>
      <description>&lt;P&gt;I am don't understand why it is nesessary to use another dateset (Order Date[Date]) in the TotalYTD formula? Why can't you use the date column in your &lt;STRONG&gt;Sales Table?&lt;/STRONG&gt; I have highlighted this below and would appreciate if you can share your knowlege:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TOTALYTD(SUM(SalesTable[SalesAmount]),&lt;STRONG&gt;'Order Date'[Date]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tnx&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 18:31:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/DAX-TOTAL-YTD-problem/m-p/384971#M11436</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-27T18:31:52Z</dc:date>
    </item>
  </channel>
</rss>

