<?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: Need help in creating the Dax(measures) to find the last day in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-creating-the-Dax-measures-to-find-the-last-day/m-p/3826882#M149621</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="521880" data-lia-user-login="Navaneetharaju_" class="lia-mention lia-mention-user"&gt;Navaneetharaju_&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;To achieve this, you can create a measure in Power BI that dynamically calculates the last day of the month based on the selected date from the date_dim table. Then, you can use this measure to determine if the task should be displayed for the selected date.&lt;/P&gt;&lt;P&gt;Here's how you can create the measure:&lt;BR /&gt;LastDayOfMonth =&lt;BR /&gt;VAR SelectedDate = SELECTEDVALUE(date_dim[date])&lt;BR /&gt;RETURN&lt;BR /&gt;IF (&lt;BR /&gt;SELECTEDVALUE(date_dim[Day]) = DAY(EOMONTH(SelectedDate, 0)),&lt;BR /&gt;1,&lt;BR /&gt;IF (&lt;BR /&gt;SELECTEDVALUE(date_dim[Day]) = DAY(EOMONTH(SelectedDate, -1)),&lt;BR /&gt;1,&lt;BR /&gt;0&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#993300"&gt;Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Apr 2024 10:58:34 GMT</pubDate>
    <dc:creator>johnbasha33</dc:creator>
    <dc:date>2024-04-10T10:58:34Z</dc:date>
    <item>
      <title>Need help in creating the Dax(measures) to find the last day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-creating-the-Dax-measures-to-find-the-last-day/m-p/3826773#M149617</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have to create a measure or calculated column to find the last day based on the selected date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Provided the sample data :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Task Name&lt;/TD&gt;&lt;TD&gt;Cron_day&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Task 1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Task 2&lt;/TD&gt;&lt;TD&gt;last&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Task 3&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Task 4&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Task 5&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample data that we provided was showing, on which day the task should run, when ever i select particular date from the date_dim table, those date task should reply,&amp;nbsp;&lt;/P&gt;&lt;P&gt;To finding the day it's quite simple, like&lt;BR /&gt;&lt;STRONG&gt;IF(day(selectedvalue(date_dim[date])=task(cron_day), 1, 0)&lt;BR /&gt;&lt;/STRONG&gt;but&amp;nbsp;&lt;STRONG&gt;&lt;BR /&gt;task 2 &lt;/STRONG&gt;it contains the field value as a &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;last&lt;/STRONG&gt;&lt;/FONT&gt;, which means every month last day only it should come, in our every month last day number will change like feb is 28 or 29, mar 31, apr 30 till dec (last day of the month will different)&lt;STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;whenever is select the last day of the any month in slicer(date_dim[date]) , for example (31-03-2024) the task 2 should display in chart or visual.&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;Thanks,&lt;BR /&gt;Raju&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 10:15:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-creating-the-Dax-measures-to-find-the-last-day/m-p/3826773#M149617</guid>
      <dc:creator>Navaneetharaju_</dc:creator>
      <dc:date>2024-04-10T10:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in creating the Dax(measures) to find the last day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-creating-the-Dax-measures-to-find-the-last-day/m-p/3826882#M149621</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="521880" data-lia-user-login="Navaneetharaju_" class="lia-mention lia-mention-user"&gt;Navaneetharaju_&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;To achieve this, you can create a measure in Power BI that dynamically calculates the last day of the month based on the selected date from the date_dim table. Then, you can use this measure to determine if the task should be displayed for the selected date.&lt;/P&gt;&lt;P&gt;Here's how you can create the measure:&lt;BR /&gt;LastDayOfMonth =&lt;BR /&gt;VAR SelectedDate = SELECTEDVALUE(date_dim[date])&lt;BR /&gt;RETURN&lt;BR /&gt;IF (&lt;BR /&gt;SELECTEDVALUE(date_dim[Day]) = DAY(EOMONTH(SelectedDate, 0)),&lt;BR /&gt;1,&lt;BR /&gt;IF (&lt;BR /&gt;SELECTEDVALUE(date_dim[Day]) = DAY(EOMONTH(SelectedDate, -1)),&lt;BR /&gt;1,&lt;BR /&gt;0&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#993300"&gt;Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 10:58:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-creating-the-Dax-measures-to-find-the-last-day/m-p/3826882#M149621</guid>
      <dc:creator>johnbasha33</dc:creator>
      <dc:date>2024-04-10T10:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in creating the Dax(measures) to find the last day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-creating-the-Dax-measures-to-find-the-last-day/m-p/3826970#M149630</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="585150" data-lia-user-login="johnbasha33" class="lia-mention lia-mention-user"&gt;johnbasha33&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;some how i conveyed wrongly the request, I don't want find the last day of the month,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I want to map &lt;STRONG&gt;Task 2&amp;nbsp; &lt;/STRONG&gt;with all last day of the month dynamically,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;whenever i select last day date in the slicer, we have to display the tasks which will run on that date.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I hope, i have explained clearly.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 11:19:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-creating-the-Dax-measures-to-find-the-last-day/m-p/3826970#M149630</guid>
      <dc:creator>Navaneetharaju_</dc:creator>
      <dc:date>2024-04-10T11:19:02Z</dc:date>
    </item>
  </channel>
</rss>

