Forum Discussion

gottapu's avatar
gottapu
Frequent Visitor
5 years ago
Solved

Employee FTE calculation

Hi,

 

I have data similar to tables below. Fact table that I se connects to number of other dimension tables and so number of rows per each assignment id are much larger but I have simplified it to make it easy to understand my issue.

 

Employee table is joined to Fact table on Employee ID and Assignment Table is joined to fact table on composite key (Assignment ID + Start Date + End Date)

 

 

I am trying to get to an output as below and I am not able to calculate Employee FTE values accurately. Appreciate if you can offer any help as I am new to Power BI and struggling as I have spend few hours on this but could not get it right.

 

Power BI report output
Employee NameAssignment IDAssignment FTEEmployee FTE
A1111
B210.50.7
B220.20.7
C310.30.7
C320.10.7
C330.30.7

 

 

Thank you,

-Raj

  • gottapu how about changing the code like this?

    Employee FTE:=IF(COUNTROWS('Fact'),SUMX(ALL(Assignment[Asgn ID]),CALCULATE(MAX('Fact'[Assignment FTE]),ALL(RepGroup[Rep Group Name]),ALL('Fact'[Assignment FTE]))))

12 Replies

    • gottapu's avatar
      gottapu
      Frequent Visitor

      Thanks Amit for your quick reply. Unfortunately, after trying above, I am getting Employee FTE as sum of all Assignment FTE values in the fact table and hence they are way more than what I am trying to get. For Employee ID =1, I am getting Employee FTE as value 3.

       

      Thanks

      -Raj