<?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 Calculating correct FTE in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-correct-FTE/m-p/3590589#M138618</link>
    <description>&lt;P&gt;Good morning&lt;BR /&gt;&lt;BR /&gt;I have a table with employee information. It shows a changes in employee data. I have a ValidFrom and ValidTo column, which indicates that something changed in their record.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It can happen that their FTE changes within a month timframe, example from 0,5 to 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a RunningTotal measure which technically works, but gives the wrong result if there is such a case like above. What I would like to achieve is to get the latest value. Ideally, this would change on the selected time frame, for example, if 2023 is selected in the date dlicer and all months are selected, then the latest value is shown, same for quarter, month etc...&lt;BR /&gt;&lt;BR /&gt;Below is my current Running Total Measure. Which would show a combined value if there were multiple changes in a timeframe&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;FTE RT Test = 
/// Employees Amounts Over Time ///
VAR MaxDate =
    MAX ( DIM_Date[Date] )
RETURN
    CALCULATE (
        [Test FTE],
        KEEPFILTERS (
            'Emp History'[__VALID_FROM] &amp;lt;= MaxDate
                &amp;amp;&amp;amp; 'Emp History'[__VALID_UNTIL] &amp;gt;= MaxDate
                &amp;amp;&amp;amp; NOT ( CONTAINSSTRING ( 'Emp History'[JobProfil], "Trainee" ) )
        ),
        ALL ( DIM_Date ),
    USERELATIONSHIP(DIM_Date[Date], 'Emp History'[__VALID_FROM]))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 19 Dec 2023 07:22:32 GMT</pubDate>
    <dc:creator>JB_AT</dc:creator>
    <dc:date>2023-12-19T07:22:32Z</dc:date>
    <item>
      <title>Calculating correct FTE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-correct-FTE/m-p/3590589#M138618</link>
      <description>&lt;P&gt;Good morning&lt;BR /&gt;&lt;BR /&gt;I have a table with employee information. It shows a changes in employee data. I have a ValidFrom and ValidTo column, which indicates that something changed in their record.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It can happen that their FTE changes within a month timframe, example from 0,5 to 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a RunningTotal measure which technically works, but gives the wrong result if there is such a case like above. What I would like to achieve is to get the latest value. Ideally, this would change on the selected time frame, for example, if 2023 is selected in the date dlicer and all months are selected, then the latest value is shown, same for quarter, month etc...&lt;BR /&gt;&lt;BR /&gt;Below is my current Running Total Measure. Which would show a combined value if there were multiple changes in a timeframe&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;FTE RT Test = 
/// Employees Amounts Over Time ///
VAR MaxDate =
    MAX ( DIM_Date[Date] )
RETURN
    CALCULATE (
        [Test FTE],
        KEEPFILTERS (
            'Emp History'[__VALID_FROM] &amp;lt;= MaxDate
                &amp;amp;&amp;amp; 'Emp History'[__VALID_UNTIL] &amp;gt;= MaxDate
                &amp;amp;&amp;amp; NOT ( CONTAINSSTRING ( 'Emp History'[JobProfil], "Trainee" ) )
        ),
        ALL ( DIM_Date ),
    USERELATIONSHIP(DIM_Date[Date], 'Emp History'[__VALID_FROM]))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 07:22:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-correct-FTE/m-p/3590589#M138618</guid>
      <dc:creator>JB_AT</dc:creator>
      <dc:date>2023-12-19T07:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating correct FTE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-correct-FTE/m-p/3590711#M138622</link>
      <description>&lt;P&gt;I adapted the [Test FTE] to show the last value and it works as expected&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Test FTE = CALCULATE ( 
        LASTNONBLANK ( 'Emp History'[FTE], 1 ))&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 19 Dec 2023 08:17:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-correct-FTE/m-p/3590711#M138622</guid>
      <dc:creator>JB_AT</dc:creator>
      <dc:date>2023-12-19T08:17:39Z</dc:date>
    </item>
  </channel>
</rss>

