<?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 Compare this year to last year but only up to equivalent date to today in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-this-year-to-last-year-but-only-up-to-equivalent-date-to/m-p/2412740#M63619</link>
    <description>&lt;P&gt;I've got two measures that count unique ID's. One for last year and one for this year look like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;YTD = TOTALYTD&lt;/SPAN&gt;&lt;SPAN&gt;(COUNTA&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Alerts (API)'[uid]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;'Alerts (API)'[date]&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;PRE&gt;YTD last year =&amp;nbsp;&lt;SPAN&gt;TOTALYTD&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;COUNTA&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Alerts (API)'[uid]&lt;/SPAN&gt;&lt;SPAN&gt;),&amp;nbsp;&lt;/SPAN&gt;SAMEPERIODLASTYEAR&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Alerts (API)'[date]&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;These both give the correct values.&lt;BR /&gt;However, the version for last year shows all future dates when visualised. For example, when I show the data in a KPI, the target value displays the sum for the whole of last year. What I want is the sum up to today's equivalent date for last year. I've tried filters for this but there's no way for me to filter dynamically. I don't want to have to come in every day and manually add a day.&lt;/P&gt;</description>
    <pubDate>Wed, 23 Mar 2022 14:54:15 GMT</pubDate>
    <dc:creator>owenv</dc:creator>
    <dc:date>2022-03-23T14:54:15Z</dc:date>
    <item>
      <title>Compare this year to last year but only up to equivalent date to today</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-this-year-to-last-year-but-only-up-to-equivalent-date-to/m-p/2412740#M63619</link>
      <description>&lt;P&gt;I've got two measures that count unique ID's. One for last year and one for this year look like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;YTD = TOTALYTD&lt;/SPAN&gt;&lt;SPAN&gt;(COUNTA&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Alerts (API)'[uid]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;'Alerts (API)'[date]&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;PRE&gt;YTD last year =&amp;nbsp;&lt;SPAN&gt;TOTALYTD&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;COUNTA&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Alerts (API)'[uid]&lt;/SPAN&gt;&lt;SPAN&gt;),&amp;nbsp;&lt;/SPAN&gt;SAMEPERIODLASTYEAR&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Alerts (API)'[date]&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;These both give the correct values.&lt;BR /&gt;However, the version for last year shows all future dates when visualised. For example, when I show the data in a KPI, the target value displays the sum for the whole of last year. What I want is the sum up to today's equivalent date for last year. I've tried filters for this but there's no way for me to filter dynamically. I don't want to have to come in every day and manually add a day.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 14:54:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-this-year-to-last-year-but-only-up-to-equivalent-date-to/m-p/2412740#M63619</guid>
      <dc:creator>owenv</dc:creator>
      <dc:date>2022-03-23T14:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: Compare this year to last year but only up to equivalent date to today</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-this-year-to-last-year-but-only-up-to-equivalent-date-to/m-p/2412762#M63622</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="175914" data-lia-user-login="owenv" class="lia-mention lia-mention-user"&gt;owenv&lt;/a&gt;&amp;nbsp;You may find this helpful - &lt;A href="https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008" target="_blank"&gt;https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 14:58:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-this-year-to-last-year-but-only-up-to-equivalent-date-to/m-p/2412762#M63622</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2022-03-23T14:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Compare this year to last year but only up to equivalent date to today</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-this-year-to-last-year-but-only-up-to-equivalent-date-to/m-p/2417594#M63883</link>
      <description>&lt;P&gt;I fixed this using a calendar. I've been able to get by without one until now. Thanks for your input&lt;/P&gt;</description>
      <pubDate>Fri, 25 Mar 2022 10:18:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-this-year-to-last-year-but-only-up-to-equivalent-date-to/m-p/2417594#M63883</guid>
      <dc:creator>owenv</dc:creator>
      <dc:date>2022-03-25T10:18:21Z</dc:date>
    </item>
  </channel>
</rss>

