Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Calculate FTE with gaps in dates and the dates are in different rows.

Hi,

 

I am trying to calculate the FTE per month per Department/ Devision and my data looks like this:

 

VincentKok_0-1668447132602.png

As you can see for employee# 6042 He had different FTE status through time.

From 15-10-2018 till 01-09-2019 it was 1.0 FTE

From 01-09-2019 till 01-01-2022 it was 0.9 FTE

From 01-01-2022 till 01-07-2022 it was 1.0 FTE

From 01-07-2022 till Today is is 0.9 FTE

 

And I want my output to be something like this but correct, with the gaps filled between two dates that are in different rows. So for Employee 6042 1 FTE for January, February, March, April, May and June and 0.90 FTE for July and the rest of the year. So that the column totals per month (or year or quarter) make sense...

 

VincentKok_4-1668448306799.png

 

 

 

Can anyone help me with this?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

According to your description, here are my steps you can follow as a solution.

(1) We can create tables.

Table = 
var _date=FILTER(CALENDAR(EOMONTH(MIN('FTE Report'[FTE Date]),-1)+1,TODAY()),DAY([Date])=1)
return
CROSSJOIN(SELECTCOLUMNS('FTE Report',"Employee#",[Employee #],"FTE Date", [FTE Date],"Value",[FTE Status]),_date)
Table22 = 
DISTINCT(FILTER('Table',[Flag]=1))

(3) Then the result is as follows.

vtangjiemsft_0-1669021814497.png

Best Regards,

Neeko Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

I didn't know how to add the pbix file to this post so I've created a onedrive link:

 

OneDrive Link to .pbix and data sheet 

 

Hope this helps!

Anonymous
Not applicable

Hi @Anonymous ,

 

Do you mean to fill all null values in the matrix, the value of the null value depends on the value corresponding to the previous non-null month as below screenshot shown.

Picture1.png

 

Please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

Anonymous
Not applicable

Here is the link to the .pbix and datasheet: OneDrive Link 

Anonymous
Not applicable

Hi @Anonymous ,

 

I don't have permission to get pbix.

Please refer to:

How to provide sample data in the Power BI Forum

 

You can refer to the following posts that may be helpful to you:

Solved: Fill blank values with previous value - Microsoft Power BI Community

Solved: Fill blanks with previous value - Microsoft Power BI Community

dataonwheels.wordpress.com

 

Best Regards,

Neeko Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

Anonymous
Not applicable

Hi Neeko,

 

There are no blanks in the dataset. The problem is that there are multiple rows after each change in hours. For example Employee # 6042 with 4 rows on different FTE dates:

 

From 15-10-2018 till 01-09-2019 it was 1.0 FTE

From 01-09-2019 till 01-01-2022 it was 0.9 FTE

From 01-01-2022 till 01-07-2022 it was 1.0 FTE

From 01-07-2022 till Today is is 0.9 FTE

 

Can you work with this sample data?

The link to the files is: https://1drv.ms/u/s!AnfNpx_Gnyu2gYUyzh_MW2oTRo-epQ?e=fFkW4Z 

 

Employee #FTE DateFTE StatusEmployment StatusDivisionDepartmentLocationJob TitleHire DateContract End
601901-01-220,8ContractorOperationsLegalNetherlandsJob Title Employee 601901-01-18 
602409-07-181EmployeeProduct DevelopmentEngineeringNetherlandsJob Title Employee 602409-07-18 
602501-07-181EmployeeManagement TeamManagement TeamNetherlandsJob Title Employee 602501-07-18 
603515-09-181EmployeeCustomer Success OrganizationPre SalesGermanyJob Title Employee 603515-09-18 
603501-04-220,8EmployeeCustomer Success OrganizationPre SalesGermanyJob Title Employee 603515-09-18 
603601-01-220,8EmployeeProduct DevelopmentProduct OperationsNetherlandsJob Title Employee 603601-09-18 
604024-09-181EmployeeSalesDirect SalesUnited StatesJob Title Employee 604024-09-18 
604101-10-180,9EmployeeProduct DevelopmentIT & SecurityNetherlandsJob Title Employee 604101-10-18 
604215-10-181EmployeeOperationsHuman ResourcesNetherlandsJob Title Employee 604215-10-18 
604201-09-190,9EmployeeOperationsHuman ResourcesNetherlandsJob Title Employee 604215-10-18 
604201-01-221EmployeeOperationsHuman ResourcesNetherlandsJob Title Employee 604215-10-18 
604201-07-220,9EmployeeOperationsHuman ResourcesNetherlandsJob Title Employee 604215-10-18 
604329-10-181EmployeeSalesDirect SalesNetherlandsJob Title Employee 604329-10-18 
604505-11-181EmployeeSalesInside SalesGermanyJob Title Employee 604505-11-18 
604611-12-180,8EmployeeProduct DevelopmentEngineeringNetherlandsJob Title Employee 604611-12-18 
604701-02-191EmployeeProduct DevelopmentEngineeringNetherlandsJob Title Employee 604701-02-19 
604701-04-210,95EmployeeProduct DevelopmentEngineeringNetherlandsJob Title Employee 604701-02-19 
604801-02-190,9EmployeeProduct DevelopmentIT & SecurityNetherlandsJob Title Employee 604801-02-19 
605009-02-191EmployeeCustomer Success OrganizationConsultancyCanadaJob Title Employee 605009-02-19 
605104-03-191EmployeeSalesInside SalesUnited KingdomJob Title Employee 605104-03-19 
605801-07-191EmployeeCustomer Success OrganizationConsultancyNetherlandsJob Title Employee 605801-07-19 
605901-11-181ContractorProduct DevelopmentEngineeringNetherlandsJob Title Employee 605911-10-21 
605901-03-200,8ContractorProduct DevelopmentEngineeringNetherlandsJob Title Employee 605911-10-21 
Anonymous
Not applicable

Hi @Anonymous ,

 

According to your description, here are my steps you can follow as a solution.

(1) We can create tables.

Table = 
var _date=FILTER(CALENDAR(EOMONTH(MIN('FTE Report'[FTE Date]),-1)+1,TODAY()),DAY([Date])=1)
return
CROSSJOIN(SELECTCOLUMNS('FTE Report',"Employee#",[Employee #],"FTE Date", [FTE Date],"Value",[FTE Status]),_date)
Table22 = 
DISTINCT(FILTER('Table',[Flag]=1))

(3) Then the result is as follows.

vtangjiemsft_0-1669021814497.png

Best Regards,

Neeko Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

Anonymous
Not applicable

Thank you so much, wouldn't have got this by my self

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.