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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
jay_diehl
Regular Visitor

Total hours without employee duplicating

Hi,

 

My datamodel is set up as followed for the dimensions:

Dim_project

ProjectIDProject
1Test

 Dim_employee

EmployeeIDName
1Hans
2Kees
3Henk

Fact tables;

Fct_Forecast

ProjectIDEmployeeIDForecastedHours
1110

Fct_Costs

ProjectIDEmployeeIDWorkedHours
112
125
134

 

Now I want to achieve the following result on my dashboard:

ProjectNameForecastTotal hours spent
TestHans1011

Because the employee is linked to costs table the value I get is the following:

ProjectNameForecastTotal hours spent
TestHans102

These are the hours that are booked by the employee Hans. I tried using all function as follows (Total hours spent = calculate(SUM('Fct_costs'[Workedhours]), All(Dim_employee[EmployeeID]))

but this resulted in the following table:

ProjectNameForecastTotal hours spent
TestHans1011
TestKees 11
TestHenk 11

How do I remove those rows for Kees and Henk and do I keep the employee name in my visual? I need to see who made the forecast. I first thought of making a measure to use as a flag when the forecast column is blank then 0 else 1 and then filter this value to be 1. This will not work because there are projects created by employees without a forecast. Anybody else has an idea how I can the employee name in the visual with the total hours for the project without the other employee names who booked the hours?

 

Thx

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @jay_diehl 

please try

spent =
IF (
NOT ISEMPTY ( Fct_Forecast ),
CALCULATE ( SUM ( 'Fct_costs'[Workedhours] ), ALL ( Dim_employee[EmployeeID] ) )
)

View solution in original post

1 REPLY 1
tamerj1
Super User
Super User

Hi @jay_diehl 

please try

spent =
IF (
NOT ISEMPTY ( Fct_Forecast ),
CALCULATE ( SUM ( 'Fct_costs'[Workedhours] ), ALL ( Dim_employee[EmployeeID] ) )
)

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors