Problems with userelationship function

Hello all
In this model, i’m working with 3 fact tables connected relatively to dates through date column.
One of the table is call time table, where all employees put their time in their jobs. This table is still very small.
My Tab Dates, has a column (DueWorkTime) that if typeDay is weekday then add 8 (hours) else 0.
I’ve merge this table with time table and add that DueWorkTime column. Now, if the employee is to be controlled, then add that DueWorkTime column, else 0. Then i did this measure:

T DueWorkTime = CALCULATE( SUM(‘Tab Dates’[DueWorkTime] ),
USERELATIONSHIP( ‘Tab Dates’[Date], ‘Tab TimeSheet’[Date]))

My report has 3 filters, Dates, Employee name and business unit. All those are in the same table.
My visual, if i select a specific date, from 29/9 till 31/10 it’s suppose to show all 32 days and in those days, the hours worked and the hours that was suppose to work. This hour worked measure is:

Ts Hours = CALCULATE(SUM( ‘Tab TimeSheet’[Time (h)]),
USERELATIONSHIP( ‘Tab Dates’[Date], ‘Tab TimeSheet’[Date] ))

So far so good, as you can see. It shows all calendar days and only the hours worked by that person.

But when i add the project ID it, this happens

it shows all the projects ID for this person no matter the day. But if i want to add the project name instead, which is linked to that table (Tab Projects), it shows every project for each calendar day. And it was supposed to show only the information for each day that the employee have worked.

Finishing the first measure above (T DueWorkTime) Works IF i’ve select only one employee name. But if i select any, i mean all, it shows only 8 hours instead of 8 times number employees. Easy to fix?

I don’t have enough knowledge to at least understand where’s my mistake or how should i do it instead.
Can anybody help me? I’m attaching a file
Thanks a lot
TM.xlsx (127.5 KB)

@pedroccamara There is no DueWorkTime column in the data that you have provided.

Based on the available information this should work:

T DueWorkTime =
CALCULATE ( SUM ( 'Tab_Dates'[DueWorkTime] ), 'Tab_TimeSheet' )

Hey @AntrikshSharma !
You’re right. I’ve change it afterwords to be meaningful.
Your measure gives me the same result as mine, exactly the same as both pictures above. And if i add a column (Project name) from another ( related ) table, it shows me that column for every day even if there’s not any hours (on the Hours column) for that day, like this
I have to understand how to solve this.
To finish, on my 2nd visual above, if i select 2 or 3 employees, it should show the [T DueWorkTime], times the number of employees selected…
Can you or anybody help?
Thanks a lot

Thanks for posting your question @pedroccamara. To receive a resolution in a timely manner please make sure that you provide all the necessary details on this thread.

Here is a potential list of additional information to include in this thread; demo pbix file, images of the entire scenario you are dealing with, screenshot of the data model, details of how you want to visualize a result, and any other supporting links and details.

Including all of the above will likely enable a quick solution to your question.