<?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: Using ALLSELECTED and ALLEXCEPT Together to Get Max Date at Higher Level in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALLSELECTED-and-ALLEXCEPT-Together-to-Get-Max-Date-at/m-p/2368293#M60693</link>
    <description>&lt;P&gt;Also this might work&lt;BR /&gt;MAXX ( ALLSELECTED ( Sheet1[Job #] ), CALCULATE ( VALUES ( Sheet1[Date] ) ) ),&lt;/P&gt;&lt;P&gt;ALLSELECTED ( Sheet1[Project #] )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;</description>
    <pubDate>Tue, 01 Mar 2022 20:05:17 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-03-01T20:05:17Z</dc:date>
    <item>
      <title>Using ALLSELECTED and ALLEXCEPT Together to Get Max Date at Higher Level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALLSELECTED-and-ALLEXCEPT-Together-to-Get-Max-Date-at/m-p/2366089#M60564</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This seems like a pretty basic challenge I have. And it's driving me nuts that I can't figure it out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample dataset:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to return the Max Date at the Project level.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Project Max Date = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Sheet1[Date]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ALLEXCEPT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Sheet1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Sheet1[Project #]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Works like a charm:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I want it to take the filtered selection into consideration. i.e. - When I'm filtered to just Job 1, it will reflect a Max date of 1/1/22. I figured I could just do something like this and wrap an allselected around my first measure, but no dice.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Project Max Date ALLSELECTED = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Project Max Date]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Sheet1&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;Any help is grealy appreciated!&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 01 Mar 2022 03:04:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALLSELECTED-and-ALLEXCEPT-Together-to-Get-Max-Date-at/m-p/2366089#M60564</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-01T03:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using ALLSELECTED and ALLEXCEPT Together to Get Max Date at Higher Level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALLSELECTED-and-ALLEXCEPT-Together-to-Get-Max-Date-at/m-p/2366217#M60572</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please try the below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;STRONG&gt;&lt;EM&gt;Project Max Date ALLSELECTED = &lt;/EM&gt;&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;CALCULATE(MAX(Sheet1[Date]),&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;ALLSELECTED(Sheet1)&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 01 Mar 2022 04:29:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALLSELECTED-and-ALLEXCEPT-Together-to-Get-Max-Date-at/m-p/2366217#M60572</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-03-01T04:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using ALLSELECTED and ALLEXCEPT Together to Get Max Date at Higher Level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALLSELECTED-and-ALLEXCEPT-Together-to-Get-Max-Date-at/m-p/2367966#M60675</link>
      <description>&lt;P&gt;Thanks for the quick repsonse, JiHwan. Yes, you are correct. That did work. And sorry, I should have included another job to throw another wrinkle into this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've added another job to the dataset.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would like to see is the Max date for each Project based on the filtered selection.&lt;/P&gt;&lt;P&gt;So my original formula works as long as everything is selected.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I filter down to just the Jobs title '1', it doesn't. The Project 1/Job 1 is still reflecting the Max date of the Project 1/Job 2, even though it's now filtered out.&lt;/P&gt;&lt;P&gt;And using the second forumula will give the Max date of the entire filtered selection. However, I still want it to consider the filter context based on the Project.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Project 1/Job 1 should reflect it's own date (now that Project 1/Job 2 is filtered out). So neither of these formulas get that right. I figured it would need to be a combination of the formulas. But I'm having trouble nesting the ALL and/or CALCULATES in order to get it to work.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 17:21:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALLSELECTED-and-ALLEXCEPT-Together-to-Get-Max-Date-at/m-p/2367966#M60675</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-01T17:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using ALLSELECTED and ALLEXCEPT Together to Get Max Date at Higher Level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALLSELECTED-and-ALLEXCEPT-Together-to-Get-Max-Date-at/m-p/2368160#M60682</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;CALCULATE (&lt;/P&gt;&lt;P&gt;MAXX ( ALLSELECTED ( Sheet1[Job #] ), Sheet1[Date] ),&lt;/P&gt;&lt;P&gt;ALLSELECTED ( Sheet1[Project #] )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 18:54:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALLSELECTED-and-ALLEXCEPT-Together-to-Get-Max-Date-at/m-p/2368160#M60682</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-01T18:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using ALLSELECTED and ALLEXCEPT Together to Get Max Date at Higher Level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALLSELECTED-and-ALLEXCEPT-Together-to-Get-Max-Date-at/m-p/2368248#M60689</link>
      <description>&lt;P&gt;Thanks. But it gives me an error when I try to use Sheet1[Date]&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 19:51:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALLSELECTED-and-ALLEXCEPT-Together-to-Get-Max-Date-at/m-p/2368248#M60689</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-01T19:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using ALLSELECTED and ALLEXCEPT Together to Get Max Date at Higher Level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALLSELECTED-and-ALLEXCEPT-Together-to-Get-Max-Date-at/m-p/2368270#M60691</link>
      <description>&lt;P&gt;Use MAX ( Sheet1[Date] )&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 19:59:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALLSELECTED-and-ALLEXCEPT-Together-to-Get-Max-Date-at/m-p/2368270#M60691</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-01T19:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using ALLSELECTED and ALLEXCEPT Together to Get Max Date at Higher Level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALLSELECTED-and-ALLEXCEPT-Together-to-Get-Max-Date-at/m-p/2368293#M60693</link>
      <description>&lt;P&gt;Also this might work&lt;BR /&gt;MAXX ( ALLSELECTED ( Sheet1[Job #] ), CALCULATE ( VALUES ( Sheet1[Date] ) ) ),&lt;/P&gt;&lt;P&gt;ALLSELECTED ( Sheet1[Project #] )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 20:05:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALLSELECTED-and-ALLEXCEPT-Together-to-Get-Max-Date-at/m-p/2368293#M60693</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-01T20:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using ALLSELECTED and ALLEXCEPT Together to Get Max Date at Higher Level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALLSELECTED-and-ALLEXCEPT-Together-to-Get-Max-Date-at/m-p/2368419#M60699</link>
      <description>&lt;P&gt;I haven't tried your last one. But wanted to message that my colleuge was able to solve.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Project Max Date (working) = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Sheet1[Date]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;AllSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Sheet1&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;Sheet1[Project #]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Sheet1[Project #]&lt;/SPAN&gt;&lt;SPAN&gt;)))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 01 Mar 2022 21:25:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALLSELECTED-and-ALLEXCEPT-Together-to-Get-Max-Date-at/m-p/2368419#M60699</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-01T21:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using ALLSELECTED and ALLEXCEPT Together to Get Max Date at Higher Level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALLSELECTED-and-ALLEXCEPT-Together-to-Get-Max-Date-at/m-p/2368420#M60700</link>
      <description>&lt;P&gt;My colleague was able to solve&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Project Max Date (working) = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Sheet1[Date]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;AllSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Sheet1&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;Sheet1[Project #]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Sheet1[Project #]&lt;/SPAN&gt;&lt;SPAN&gt;)))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 01 Mar 2022 21:25:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALLSELECTED-and-ALLEXCEPT-Together-to-Get-Max-Date-at/m-p/2368420#M60700</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-01T21:25:46Z</dc:date>
    </item>
  </channel>
</rss>

