<?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: How to check month is available or not using Dax in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-check-month-is-available-or-not-using-Dax/m-p/4034598#M159823</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;EOMONTH is a non-time intelligence function and thus does not require a date table to be able to calculate dates. It's internally wired into the function. What you can do is add a check on your date table or other table to see if the date is present and if not, just return "-". Like:&lt;/P&gt;
&lt;P&gt;VAR isPresent = COUNTROWS(FILTER('Automated Spend', [Month-Year] = futureSixMonths))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that is blank, then the date is not present.&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jul 2024 12:16:11 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2024-07-10T12:16:11Z</dc:date>
    <item>
      <title>How to check month is available or not using Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-check-month-is-available-or-not-using-Dax/m-p/4034454#M159773</link>
      <description>&lt;P&gt;Hi Community..!!&lt;/P&gt;&lt;P&gt;Below is my measure,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;@@6 month range = &lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;var selected_month = SELECTEDVALUE('Automated Spend'[Month-Year])&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;var future7thMonths = EOMONTH(selected_month,7)&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;var futureSixMonths = EOMONTH(future7thMonths,5)&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;RETURN FORMAT(future7thMonths,"mmm'yy") &amp;amp; "- " &amp;amp; FORMAT(futureSixMonths, "mmm'yy")&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;the above measure output is as follows,&lt;/DIV&gt;&lt;DIV&gt;If i select Jan-24 from the slicer then it will display&amp;nbsp;&lt;SPAN&gt;&lt;SPAN class=""&gt;Aug'24 to Jan'25 in the card visual as below image,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;The problem here is , Jan'25 month is not present in my dataset then how it is displaying?&lt;/P&gt;&lt;P&gt;and i want the output as "-" if the month is not available in the dataset.&lt;/P&gt;&lt;P&gt;How do we do this by using DAX?&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 10 Jul 2024 10:37:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-check-month-is-available-or-not-using-Dax/m-p/4034454#M159773</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-10T10:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to check month is available or not using Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-check-month-is-available-or-not-using-Dax/m-p/4034598#M159823</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;EOMONTH is a non-time intelligence function and thus does not require a date table to be able to calculate dates. It's internally wired into the function. What you can do is add a check on your date table or other table to see if the date is present and if not, just return "-". Like:&lt;/P&gt;
&lt;P&gt;VAR isPresent = COUNTROWS(FILTER('Automated Spend', [Month-Year] = futureSixMonths))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that is blank, then the date is not present.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 12:16:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-check-month-is-available-or-not-using-Dax/m-p/4034598#M159823</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-07-10T12:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to check month is available or not using Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-check-month-is-available-or-not-using-Dax/m-p/4034650#M159834</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&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;&lt;P&gt;Thanks for the suggestion.&lt;/P&gt;&lt;P&gt;But I got the output and below is the solution,&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;@@6 month range =&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;var selected_month = SELECTEDVALUE('Automated Spend'[Month-Year])&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;var future7thMonth = EOMONTH(selected_month,7)&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;var future12thMonth = EOMONTH(future7thMonth,5)&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;VAR future12MonthFormatted = FORMAT(future12thMonth, "mmm'yy")&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;VAR isFuture12thMonthPresent = &lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; CALCULATE(&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; COUNTROWS('Automated Spend'),&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FILTER(&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Automated Spend',&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FORMAT('Automated Spend'[Month-Year], "mmm'yy") = future12MonthFormatted&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; ) &amp;gt; 0&lt;/STRONG&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;STRONG&gt;var result = IF(isFuture12thMonthPresent,future12MonthFormatted,BLANK())&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;RETURN FORMAT(future7thMonth,"mmm'yy") &amp;amp; "- " &amp;amp; FORMAT(result, "mmm'yy")&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 10 Jul 2024 12:50:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-check-month-is-available-or-not-using-Dax/m-p/4034650#M159834</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-10T12:50:31Z</dc:date>
    </item>
  </channel>
</rss>

