<?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: FTE per employee is correct but not total in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FTE-per-employee-is-correct-but-not-total/m-p/3084746#M107727</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6923" data-lia-user-login="Bokazoit" class="lia-mention lia-mention-user"&gt;Bokazoit&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please try&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;FTE Norm Timeloen =
SUMX (
    CROSSJOIN ( VALUES ( DimStamdata[Lonnummer] ), VALUES ( 'Date'[MonthYear] ) ),
    CALCULATE (
        [Arbejds-timer i perioden] / 162.5,
        FILTER ( DimJob, DimJob[Ansættelsesform] = "Timelønnede" )
    )
)&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 17 Feb 2023 09:35:14 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2023-02-17T09:35:14Z</dc:date>
    <item>
      <title>FTE per employee is correct but not total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FTE-per-employee-is-correct-but-not-total/m-p/3084543#M107703</link>
      <description>&lt;P&gt;My measure works fine on a per employee, but the total is wrong. The measure is this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;FTE ny = 

Var MaxDate = MAX ( DimDato[Dato] )
Var MinDate = MIN ( DimDato[Dato] )

VAR EmpStartDate = MIN ( DimStamdata[Medarbejder startdato] )
VAR EmpEndDate = MAX ( DimStamdata[Medarbejder slutdato] )

VAR MinWorkDate = IF ( EmpStartDate &amp;gt;= MinDate, EmpStartDate, MinDate )
VAR MaxWorkDate = IF ( EmpEndDate &amp;lt;= MaxDate &amp;amp;&amp;amp; EmpEndDate &amp;lt;&amp;gt; BLANK() , EmpEndDate, MaxDate )

VAR WorkMthCount = IF ( DATEDIFF(MinWorkDate,MaxWorkDate,MONTH) &amp;lt; 0, BLANK(), DATEDIFF(MinWorkDate,MaxWorkDate,MONTH) + 1)
VAR MonthVarCount = DATEDIFF ( MinDate, MaxDate, MONTH )

RETURN

([Arbejdstid] / 37.5) * ( WorkMthCount / (MonthVarCount + 1 ) )&lt;/LI-CODE&gt;
&lt;P&gt;Arbejdstid is working hours per week, and the result:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;FTE ny is my measure that correctly calculates the FTE over full year, were employee 9304 has been hired for only 2 month giving it a 0,17 (2 out of 12 month) FTE count. But the Total 3,67 is not correct, it should be (1 + 1 + 0.67 + 0.17 = 2.84)&lt;BR /&gt;&lt;BR /&gt;What am I missing?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 07:27:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FTE-per-employee-is-correct-but-not-total/m-p/3084543#M107703</guid>
      <dc:creator>Bokazoit</dc:creator>
      <dc:date>2023-02-17T07:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: FTE per employee is correct but not total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FTE-per-employee-is-correct-but-not-total/m-p/3084558#M107705</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6923" data-lia-user-login="Bokazoit" class="lia-mention lia-mention-user"&gt;Bokazoit&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please try&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;FTE ny =
SUMX (
    VALUES ( 'Table'[Lonnummer] ),
    CALCULATE (
        VAR MaxDate =
            MAX ( DimDato[Dato] )
        VAR MinDate =
            MIN ( DimDato[Dato] )
        VAR EmpStartDate =
            MIN ( DimStamdata[Medarbejder startdato] )
        VAR EmpEndDate =
            MAX ( DimStamdata[Medarbejder slutdato] )
        VAR MinWorkDate =
            IF ( EmpStartDate &amp;gt;= MinDate, EmpStartDate, MinDate )
        VAR MaxWorkDate =
            IF ( EmpEndDate &amp;lt;= MaxDate &amp;amp;&amp;amp; EmpEndDate &amp;lt;&amp;gt; BLANK (), EmpEndDate, MaxDate )
        VAR WorkMthCount =
            IF (
                DATEDIFF ( MinWorkDate, MaxWorkDate, MONTH ) &amp;lt; 0,
                BLANK (),
                DATEDIFF ( MinWorkDate, MaxWorkDate, MONTH ) + 1
            )
        VAR MonthVarCount =
            DATEDIFF ( MinDate, MaxDate, MONTH )
        RETURN
            ( [Arbejdstid] / 37.5 ) * ( WorkMthCount / ( MonthVarCount + 1 ) )
    )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 17 Feb 2023 07:40:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FTE-per-employee-is-correct-but-not-total/m-p/3084558#M107705</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-02-17T07:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: FTE per employee is correct but not total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FTE-per-employee-is-correct-but-not-total/m-p/3084662#M107714</link>
      <description>&lt;P&gt;Thank You, that did it almost. Meaning over year it gave me the correct result, but now the employees working on hourly wage is not correct in the total:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;FTE Norm Timeloen = CALCULATE([Arbejds-timer i perioden] / 162.5 , FILTER(DimJob, DimJob[Ansættelsesform] = "Timelønnede"))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The total should be average&amp;nbsp; over the periode per worker&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 08:53:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FTE-per-employee-is-correct-but-not-total/m-p/3084662#M107714</guid>
      <dc:creator>Bokazoit</dc:creator>
      <dc:date>2023-02-17T08:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: FTE per employee is correct but not total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FTE-per-employee-is-correct-but-not-total/m-p/3084719#M107722</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6923" data-lia-user-login="Bokazoit" class="lia-mention lia-mention-user"&gt;Bokazoit&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are we talking about one or two measures? Which one has the problem? By the way, what is the column&amp;nbsp;'Table'[Lonnummer] and from which table? And the MonthYear from which table?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 09:21:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FTE-per-employee-is-correct-but-not-total/m-p/3084719#M107722</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-02-17T09:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: FTE per employee is correct but not total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FTE-per-employee-is-correct-but-not-total/m-p/3084737#M107725</link>
      <description>&lt;P&gt;FTE norm timeloen is the measure for employees payed on hourly basis&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Lonnummer = employee number and comes from DimStamdata (dimension containing all employer specific data such as name adress etc.) and MonthYear from my data dimension&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 09:29:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FTE-per-employee-is-correct-but-not-total/m-p/3084737#M107725</guid>
      <dc:creator>Bokazoit</dc:creator>
      <dc:date>2023-02-17T09:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: FTE per employee is correct but not total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FTE-per-employee-is-correct-but-not-total/m-p/3084746#M107727</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6923" data-lia-user-login="Bokazoit" class="lia-mention lia-mention-user"&gt;Bokazoit&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please try&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;FTE Norm Timeloen =
SUMX (
    CROSSJOIN ( VALUES ( DimStamdata[Lonnummer] ), VALUES ( 'Date'[MonthYear] ) ),
    CALCULATE (
        [Arbejds-timer i perioden] / 162.5,
        FILTER ( DimJob, DimJob[Ansættelsesform] = "Timelønnede" )
    )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 17 Feb 2023 09:35:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FTE-per-employee-is-correct-but-not-total/m-p/3084746#M107727</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-02-17T09:35:14Z</dc:date>
    </item>
  </channel>
</rss>

