<?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: Need Help with formula to flag year to date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-formula-to-flag-year-to-date/m-p/1144893#M17227</link>
    <description>&lt;P&gt;the formula I used pulls sales for multiple years but from Jan 1 to end of June, and I just need it to stop at today June 5th for all years. I would like to have 1 filter for year to date, and having diferent formulas doesn't make sense.&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jun 2020 18:32:23 GMT</pubDate>
    <dc:creator>tracyhopaulson</dc:creator>
    <dc:date>2020-06-05T18:32:23Z</dc:date>
    <item>
      <title>Need Help with formula to flag year to date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-formula-to-flag-year-to-date/m-p/1144698#M17214</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to create a year to date flag in the calendar table so I can use this field as a filter to display sales for five years.&amp;nbsp; My current formula flags everyday in June and I need it to stop at today's date, but couldn't figure out how.&amp;nbsp; Can someone please help untangle this web? I dropped the file in OneDrive folder here.&amp;nbsp; Thanks in advance for your help.&lt;/P&gt;&lt;P&gt;&lt;A title="YTD flag" href="http://  https://1drv.ms/u/s!AkamwyidmjyMcWJDV5cjYAWKQPc?e=SvO7Lz " target="_self"&gt;https://1drv.ms/u/s!AkamwyidmjyMcWJDV5cjYAWKQPc?e=SvO7Lz &lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 17:07:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-formula-to-flag-year-to-date/m-p/1144698#M17214</guid>
      <dc:creator>tracyhopaulson</dc:creator>
      <dc:date>2020-06-05T17:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with formula to flag year to date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-formula-to-flag-year-to-date/m-p/1144814#M17221</link>
      <description>&lt;P&gt;You will specify that flag in your Dates table for each of the past years.&amp;nbsp; For the prior year you can use&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IsPastPY = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR LastDatePY = EDATE(MAX('Transactions'[Day]),-12)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN [date]&amp;lt;=LastDatePY&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Note that the filter criteria is based on the last day with transactions - which doesn't have to be today - it can be a couple days back. In the interest of fairness (comparing apples to apples) you want to decide which date field to use for the comparison.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 05 Jun 2020 17:52:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-formula-to-flag-year-to-date/m-p/1144814#M17221</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-06-05T17:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with formula to flag year to date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-formula-to-flag-year-to-date/m-p/1144842#M17223</link>
      <description>&lt;P&gt;are you able to access the file I attached in the link? I need ytd for 5 years, not just last year and this year, so how is your formula going to work?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 18:01:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-formula-to-flag-year-to-date/m-p/1144842#M17223</guid>
      <dc:creator>tracyhopaulson</dc:creator>
      <dc:date>2020-06-05T18:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with formula to flag year to date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-formula-to-flag-year-to-date/m-p/1144847#M17224</link>
      <description>&lt;P&gt;for the year before the previous you substitute 12 with 24, then for the year before with 36 , and so on.&amp;nbsp; They have to be separate columns unless you have regular calendar years.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 18:03:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-formula-to-flag-year-to-date/m-p/1144847#M17224</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-06-05T18:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with formula to flag year to date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-formula-to-flag-year-to-date/m-p/1144893#M17227</link>
      <description>&lt;P&gt;the formula I used pulls sales for multiple years but from Jan 1 to end of June, and I just need it to stop at today June 5th for all years. I would like to have 1 filter for year to date, and having diferent formulas doesn't make sense.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 18:32:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-formula-to-flag-year-to-date/m-p/1144893#M17227</guid>
      <dc:creator>tracyhopaulson</dc:creator>
      <dc:date>2020-06-05T18:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with formula to flag year to date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-formula-to-flag-year-to-date/m-p/1144901#M17228</link>
      <description>&lt;P&gt;In that case modify your column slightly&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IsPast = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR LastDate = MAX('Transactions'[Day])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR DatePattern = MONTH(LastDate)*100+Day(LastDate)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN Month([date])*100+Day([date]) &amp;lt;=DatePattern&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The 100 is arbitrary, any number 31 or higher works. Note: This approach only works for calendar years, not for fiscal years that start outside of Jan 1.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 18:41:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-formula-to-flag-year-to-date/m-p/1144901#M17228</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-06-05T18:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with formula to flag year to date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-formula-to-flag-year-to-date/m-p/1144930#M17232</link>
      <description>&lt;P&gt;sorry I don't follow, how does this formula flag the date to mark if it's ytd or not?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 18:57:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-formula-to-flag-year-to-date/m-p/1144930#M17232</guid>
      <dc:creator>tracyhopaulson</dc:creator>
      <dc:date>2020-06-05T18:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with formula to flag year to date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-formula-to-flag-year-to-date/m-p/1144940#M17233</link>
      <description>&lt;P&gt;The formula eliminates the year from the comparison, and only compares the composite Month-Day key against the target Mont-Day limit. It assumes there is no day lower than Jan 1, which is true for calendar years.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use a FORMAT function on the dates instead if you don't like the math.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 19:04:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-formula-to-flag-year-to-date/m-p/1144940#M17233</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-06-05T19:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with formula to flag year to date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-formula-to-flag-year-to-date/m-p/1145008#M17241</link>
      <description>&lt;P&gt;thank you, is it possible to make this formula works with fiscal calendar?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 20:12:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-formula-to-flag-year-to-date/m-p/1145008#M17241</guid>
      <dc:creator>tracyhopaulson</dc:creator>
      <dc:date>2020-06-05T20:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with formula to flag year to date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-formula-to-flag-year-to-date/m-p/1145348#M17261</link>
      <description>&lt;P&gt;My original reply was targeted at fiscal calendars, but you said you didn't want multiple columns.&amp;nbsp; You could extend that solution by adding those columns up into a combined column.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jun 2020 11:22:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-formula-to-flag-year-to-date/m-p/1145348#M17261</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-06-06T11:22:00Z</dc:date>
    </item>
  </channel>
</rss>

