<?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: Accumulated YTD that ignores filter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Accumulated-YTD-that-ignores-filter/m-p/2844820#M91007</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;This worked! Thank you very much for your help&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 16 Oct 2022 15:42:41 GMT</pubDate>
    <dc:creator>JLarkin</dc:creator>
    <dc:date>2022-10-16T15:42:41Z</dc:date>
    <item>
      <title>Accumulated YTD that ignores filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Accumulated-YTD-that-ignores-filter/m-p/2843719#M90915</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking to include a column in a table which includes sales YTD, in a monthly view.&amp;nbsp;&lt;BR /&gt;E.g. If I filter by August, it includes sales YTD for Jan-Aug.&lt;BR /&gt;&lt;BR /&gt;This is the current formula:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Total Sales YTD = 

VAR RetVal = 
CALCULATE(
    SUM('Revenue'[Sales Booked Amt - at Plan Rt]),
    ALL('DATE_DIM'),
    VALUES(DATE_DIM[YR_NBR])
)

RETURN
    IF(
        MAX('DATE_DIM'[MNTH_NBR]) &amp;lt;= SELECTEDVALUE(DATE_DIM[MNTH_NBR]),
        RetVal)&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;The issue I have is that to include a YTD calculation, I need to exclude the month filter to have Jan-Aug.&lt;BR /&gt;However, this then includes September and October data. Instead, I need the range to max at selected month value&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;Does anyone know how I can recode this to have it exclude anything after SELECTED VALUE of the month filter?&lt;BR /&gt;Unfortunately, I can't create another table as I need drill down capabilities.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 15 Oct 2022 13:42:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Accumulated-YTD-that-ignores-filter/m-p/2843719#M90915</guid>
      <dc:creator>JLarkin</dc:creator>
      <dc:date>2022-10-15T13:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulated YTD that ignores filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Accumulated-YTD-that-ignores-filter/m-p/2843756#M90918</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="457104" data-lia-user-login="JLarkin" class="lia-mention lia-mention-user"&gt;JLarkin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Total Sales YTD =
CALCULATE (
    SUM ( 'Revenue'[Sales Booked Amt - at Plan Rt] ),
    FILTER (
        ALL ( 'DATE_DIM' ),
        'DATE_DIM'[Month Number] &amp;lt;= MAX ( 'DATE_DIM'[Month Number] )
    ),
    VALUES ( DATE_DIM[YR_NBR] )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 15 Oct 2022 15:34:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Accumulated-YTD-that-ignores-filter/m-p/2843756#M90918</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-10-15T15:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulated YTD that ignores filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Accumulated-YTD-that-ignores-filter/m-p/2844820#M91007</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;This worked! Thank you very much for your help&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Oct 2022 15:42:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Accumulated-YTD-that-ignores-filter/m-p/2844820#M91007</guid>
      <dc:creator>JLarkin</dc:creator>
      <dc:date>2022-10-16T15:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulated YTD that ignores filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Accumulated-YTD-that-ignores-filter/m-p/2851828#M91454</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;, and others,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I was wondering if you could perhaps assist me with a new and similar measure.&lt;BR /&gt;Rather than just a Total Sales YTD, I'm looking to have a Sales YTD of last year - where we were this time last year.&lt;/P&gt;&lt;P&gt;Here is the code I have&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sales YTD PY = 
CALCULATE(
    SUM('Revenue'[Sales Booked Amt - at Plan Rt]),
    FILTER(
        ALL('DATE_DIM'),
        'DATE_DIM'[MNTH_NBR] &amp;lt;= MAX('DATE_DIM'[MNTH_NBR])
            &amp;amp;&amp;amp; 'DATE_DIM'[YR_NBR] = (MAX('DATE_DIM'[YR_NBR])-1)
    ),
    VALUES(DATE_DIM[YR_NBR])
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works to an extent, in the sense that if I select 2021 and 2022 in the filters, it will show 2021 data.&lt;/P&gt;&lt;P&gt;But this isn't practical, as it changes the other figures. I would need it to show 2021's figures when 2022 is selected only.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 16:48:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Accumulated-YTD-that-ignores-filter/m-p/2851828#M91454</guid>
      <dc:creator>JLarkin</dc:creator>
      <dc:date>2022-10-19T16:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulated YTD that ignores filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Accumulated-YTD-that-ignores-filter/m-p/2851972#M91461</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="457104" data-lia-user-login="JLarkin" class="lia-mention lia-mention-user"&gt;JLarkin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please try&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Sales YTD PY = 
CALCULATE(
    SUM('Revenue'[Sales Booked Amt - at Plan Rt]),
    FILTER(
        ALL('DATE_DIM'),
        'DATE_DIM'[MNTH_NBR] &amp;lt;= MAX('DATE_DIM'[MNTH_NBR])
            &amp;amp;&amp;amp; 'DATE_DIM'[YR_NBR] = (MAX('DATE_DIM'[YR_NBR])-1)
    )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 19 Oct 2022 18:48:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Accumulated-YTD-that-ignores-filter/m-p/2851972#M91461</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-10-19T18:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulated YTD that ignores filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Accumulated-YTD-that-ignores-filter/m-p/2853432#M91593</link>
      <description>&lt;P&gt;Again, thank you very much&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 10:20:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Accumulated-YTD-that-ignores-filter/m-p/2853432#M91593</guid>
      <dc:creator>JLarkin</dc:creator>
      <dc:date>2022-10-20T10:20:42Z</dc:date>
    </item>
  </channel>
</rss>

