<?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 Showing Last Selected Month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-Last-Selected-Month/m-p/4102169#M162775</link>
    <description>&lt;P&gt;Dear All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I'd like to show the name of the last selected Month And Year when having multiple selections in my slicer.&lt;/P&gt;&lt;P&gt;For example if Janunary, February, March, April, May and June are selected I'd like to show June 2020 on all rows.&lt;/P&gt;&lt;P&gt;I managed to do it with the date column as shown here:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;But when I use the Month and Year column in my code I got different result. Instead of having JUN 2020 I got MAY 2020&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Can you please help me show the last selected month?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Atanas&lt;/P&gt;</description>
    <pubDate>Thu, 15 Aug 2024 10:58:57 GMT</pubDate>
    <dc:creator>Atanas_Atanasov</dc:creator>
    <dc:date>2024-08-15T10:58:57Z</dc:date>
    <item>
      <title>Showing Last Selected Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-Last-Selected-Month/m-p/4102169#M162775</link>
      <description>&lt;P&gt;Dear All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I'd like to show the name of the last selected Month And Year when having multiple selections in my slicer.&lt;/P&gt;&lt;P&gt;For example if Janunary, February, March, April, May and June are selected I'd like to show June 2020 on all rows.&lt;/P&gt;&lt;P&gt;I managed to do it with the date column as shown here:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;But when I use the Month and Year column in my code I got different result. Instead of having JUN 2020 I got MAY 2020&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Can you please help me show the last selected month?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Atanas&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 10:58:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-Last-Selected-Month/m-p/4102169#M162775</guid>
      <dc:creator>Atanas_Atanasov</dc:creator>
      <dc:date>2024-08-15T10:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: Showing Last Selected Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-Last-Selected-Month/m-p/4102233#M162780</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I think, the reason is because of the sort order column is missed in the measure.&lt;/P&gt;
&lt;P&gt;Please try something like below.&lt;/P&gt;
&lt;P&gt;I tried to create a sample pbix file like below.&lt;/P&gt;
&lt;P&gt;please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Selected Period: =
VAR _maxdate =
    CALCULATE (
        LASTNONBLANK ( dim_calendar[month year sort], [Total orders:] ),
        ALLSELECTED ( dim_calendar )
    )
RETURN
    SELECTCOLUMNS (
        FILTER ( ALL ( dim_calendar ), dim_calendar[month year sort] = _maxdate ),
        dim_calendar[month year]
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 11:33:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-Last-Selected-Month/m-p/4102233#M162780</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2024-08-15T11:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: Showing Last Selected Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-Last-Selected-Month/m-p/4102252#M162782</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;- Thank you so much!!! It worked like a charm! Take care and stay safe!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 11:39:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-Last-Selected-Month/m-p/4102252#M162782</guid>
      <dc:creator>Atanas_Atanasov</dc:creator>
      <dc:date>2024-08-15T11:39:18Z</dc:date>
    </item>
  </channel>
</rss>

