<?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 get revenue for the last date in month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-revenue-for-the-last-date-in-month/m-p/2721436#M83014</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="386899" data-lia-user-login="Berl21" class="lia-mention lia-mention-user"&gt;Berl21&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Why don't you just place it in a matrix visual? See attached file&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Aug 2022 20:15:02 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-08-23T20:15:02Z</dc:date>
    <item>
      <title>How to get revenue for the last date in month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-revenue-for-the-last-date-in-month/m-p/2721083#M82984</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to write a measure for revenue based on a changing max date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;This is the problem:&amp;nbsp;&lt;/U&gt;&lt;BR /&gt;in my raw data, I get the date for each stage change, meaning that one order will have for example 3 milestones with a different date and revenue associated. I need to report &lt;STRONG&gt;the revenue for the latest change within a milestones and a month and ignore all other revenue information.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's say I have only one order to consider. Left is what I get as raw data from my databank, right is what I need to report:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Is there anyway to define the revenue per milestone and link the max date information with a slicer (=showing up the last day of each month for the report to automatically adapt)?&lt;BR /&gt;&lt;BR /&gt;Any help for this will be really appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pauline.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 17:12:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-revenue-for-the-last-date-in-month/m-p/2721083#M82984</guid>
      <dc:creator>Berl21</dc:creator>
      <dc:date>2022-08-23T17:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to get revenue for the last date in month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-revenue-for-the-last-date-in-month/m-p/2721436#M83014</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="386899" data-lia-user-login="Berl21" class="lia-mention lia-mention-user"&gt;Berl21&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Why don't you just place it in a matrix visual? See attached file&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 20:15:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-revenue-for-the-last-date-in-month/m-p/2721436#M83014</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-08-23T20:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to get revenue for the last date in month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-revenue-for-the-last-date-in-month/m-p/2725588#M83299</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;a matrix won't help as I have cases where there are two entries with a date within the same month and milestones. In this case, I need to select the last date of the two.&lt;BR /&gt;I was thinking that the function Rank- Partition would help here, but I have an issue with a format in Power Query, so I can't use it in this form.&lt;BR /&gt;Is there anyway to use rank partition as part of a measure?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2022 09:38:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-revenue-for-the-last-date-in-month/m-p/2725588#M83299</guid>
      <dc:creator>Berl21</dc:creator>
      <dc:date>2022-08-25T09:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to get revenue for the last date in month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-revenue-for-the-last-date-in-month/m-p/2725689#M83307</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="386899" data-lia-user-login="Berl21" class="lia-mention lia-mention-user"&gt;Berl21&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Attached is a modified version of the file.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Revenue Measure = 
SUMX ( 
    Data,
    VAR CurrentMilestoneTable =
        CALCULATETABLE ( Data, ALLEXCEPT ( Data, Data[Milestone] ) )
    VAR LastMilestoneDate = 
        MAXX ( CurrentMilestoneTable, Data[Change Date] )
    RETURN 
        IF (
            Data[Change Date] = LastMilestoneDate,
            Data[Revenue]
        )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 25 Aug 2022 10:04:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-revenue-for-the-last-date-in-month/m-p/2725689#M83307</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-08-25T10:04:07Z</dc:date>
    </item>
  </channel>
</rss>

