<?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 Month on Month employee Cost based on date of joining and date of exit. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Month-on-Month-employee-Cost-based-on-date-of-joining-and-date/m-p/3411909#M128973</link>
    <description>&lt;P&gt;I have data which contains employee cost, Name, Date of joining, Date of exit for last 5 years and the current monthly cost. Want to present in a dashboard pro rata monthly cost based on date of joining and date of exit for each month. Please help as tried many dax formula but not getting the results.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 02 Sep 2023 08:49:14 GMT</pubDate>
    <dc:creator>Sushil9104</dc:creator>
    <dc:date>2023-09-02T08:49:14Z</dc:date>
    <item>
      <title>Month on Month employee Cost based on date of joining and date of exit.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Month-on-Month-employee-Cost-based-on-date-of-joining-and-date/m-p/3411909#M128973</link>
      <description>&lt;P&gt;I have data which contains employee cost, Name, Date of joining, Date of exit for last 5 years and the current monthly cost. Want to present in a dashboard pro rata monthly cost based on date of joining and date of exit for each month. Please help as tried many dax formula but not getting the results.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Sep 2023 08:49:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Month-on-Month-employee-Cost-based-on-date-of-joining-and-date/m-p/3411909#M128973</guid>
      <dc:creator>Sushil9104</dc:creator>
      <dc:date>2023-09-02T08:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Month on Month employee Cost based on date of joining and date of exit.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Month-on-Month-employee-Cost-based-on-date-of-joining-and-date/m-p/3412136#M128991</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="611719" data-lia-user-login="Sushil9104" class="lia-mention lia-mention-user"&gt;Sushil9104&lt;/a&gt;&amp;nbsp;provide some example data with wanted output as example.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Sep 2023 19:09:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Month-on-Month-employee-Cost-based-on-date-of-joining-and-date/m-p/3412136#M128991</guid>
      <dc:creator>some_bih</dc:creator>
      <dc:date>2023-09-02T19:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: Month on Month employee Cost based on date of joining and date of exit.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Month-on-Month-employee-Cost-based-on-date-of-joining-and-date/m-p/3416712#M129301</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="611719" data-lia-user-login="Sushil9104" class="lia-mention lia-mention-user"&gt;Sushil9104&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please have a try.&lt;/P&gt;
&lt;P&gt;Create a measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Pro Rata Monthly Cost = 
VAR CurrentMonth = SELECTEDVALUE ( 'Date'[Month &amp;amp; Year] )
VAR CurrentEmployee = SELECTEDVALUE ( 'Employee'[Name] )
VAR DateOfJoining = CALCULATE ( MIN ( 'Employee'[Date of joining] ), FILTER ( 'Employee', 'Employee'[Name] = CurrentEmployee ) )
VAR DateOfExit = CALCULATE ( MAX ( 'Employee'[Date of exit] ), FILTER ( 'Employee', 'Employee'[Name] = CurrentEmployee ) )
VAR DaysInMonth = DAY ( EOMONTH ( CurrentMonth, 0 ) )
VAR DaysWorked = COUNTROWS ( DATESBETWEEN ( 'Date'[Date], MAX ( DateOfJoining, EOMONTH ( CurrentMonth, -1 ) + 1 ), MIN ( DateOfExit, EOMONTH ( CurrentMonth, 0 ) ) ) )
VAR MonthlyCost = CALCULATE ( SUM ( 'Employee'[Current monthly cost] ), FILTER ( 'Employee', 'Employee'[Name] = CurrentEmployee ) )
RETURN
DIVIDE ( MonthlyCost, DaysInMonth ) * DaysWorked&lt;/LI-CODE&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;BR /&gt;Community Support Team _ Rongtie&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 01:54:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Month-on-Month-employee-Cost-based-on-date-of-joining-and-date/m-p/3416712#M129301</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-06T01:54:20Z</dc:date>
    </item>
  </channel>
</rss>

