<?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: Dax Query Not working in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Query-Not-working/m-p/4409870#M175123</link>
    <description>&lt;P&gt;This works. Thank you so much. Can you please tell me how can i make the name dynamic to the slicer. E.g, if i have selected feb 2025 it should show feb 2024&lt;/P&gt;</description>
    <pubDate>Thu, 13 Feb 2025 22:32:37 GMT</pubDate>
    <dc:creator>homelander123</dc:creator>
    <dc:date>2025-02-13T22:32:37Z</dc:date>
    <item>
      <title>Dax Query Not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Query-Not-working/m-p/4409600#M175103</link>
      <description>&lt;P&gt;CurrentMonthLastYearCount = VAR SelectedMonth = MAX(Query1[SetupDate]) VAR LastYearSameMonthStart = EOMONTH(SelectedMonth, -12) + 1 VAR LastYearSameMonthEnd = EOMONTH(SelectedMonth, -12) RETURN CALCULATE( SUM(Query1[NewCount]), Query1[SetupDate] &amp;gt;= LastYearSameMonthStart &amp;amp;&amp;amp; Query1[SetupDate] &amp;lt;= LastYearSameMonthEnd )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to write a query which shows current month last year in my matrix based on slicer date selection but this query wont return any reuslts and would show up as blank&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 17:28:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Query-Not-working/m-p/4409600#M175103</guid>
      <dc:creator>homelander123</dc:creator>
      <dc:date>2025-02-13T17:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Query Not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Query-Not-working/m-p/4409678#M175111</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="771313" data-lia-user-login="homelander123" class="lia-mention lia-mention-user"&gt;homelander123&lt;/a&gt;&amp;nbsp;I think you want this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CurrentMonthLastYearCount = 
  VAR SelectedMonth = MAX(Query1[SetupDate]) 
  VAR LastYearSameMonthStart = EOMONTH(SelectedMonth, -13) + 1 
  VAR LastYearSameMonthEnd = EOMONTH(SelectedMonth, -12) 
  VAR Result = CALCULATE( SUM(Query1[NewCount]), Query1[SetupDate] &amp;gt;= LastYearSameMonthStart &amp;amp;&amp;amp; Query1[SetupDate] &amp;lt;= LastYearSameMonthEnd )
RETURN
  Result&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 13 Feb 2025 18:56:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Query-Not-working/m-p/4409678#M175111</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2025-02-13T18:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Query Not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Query-Not-working/m-p/4409870#M175123</link>
      <description>&lt;P&gt;This works. Thank you so much. Can you please tell me how can i make the name dynamic to the slicer. E.g, if i have selected feb 2025 it should show feb 2024&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 22:32:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Query-Not-working/m-p/4409870#M175123</guid>
      <dc:creator>homelander123</dc:creator>
      <dc:date>2025-02-13T22:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Query Not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Query-Not-working/m-p/4409871#M175124</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 22:32:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Query-Not-working/m-p/4409871#M175124</guid>
      <dc:creator>homelander123</dc:creator>
      <dc:date>2025-02-13T22:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Query Not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Query-Not-working/m-p/4411332#M175196</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="771313" data-lia-user-login="homelander123" class="lia-mention lia-mention-user"&gt;homelander123&lt;/a&gt;&amp;nbsp;If I understand what you are saying, you could do something like this and put it in a Card visual:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
  VAR SelectedMonth = MAX(Query1[SetupDate]) 
  VAR LastYearSameMonthEnd = EOMONTH(SelectedMonth, -12) 
  VAR Result = FORMAT( LastYearSameMonthEnd, "mmm yyyy" )
RETURN
  Result&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 14 Feb 2025 15:13:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Query-Not-working/m-p/4411332#M175196</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2025-02-14T15:13:46Z</dc:date>
    </item>
  </channel>
</rss>

