Forum Discussion
Anonymous
3 years agoNot applicable
calculation with dates
Hi, I have a table with employees date joined by team and date left by team. As a result, employees end up in several rows. For example employed by team A from 1-1-2020 to 31-7-2021 and employed by t...
- 3 years ago
Hi Anonymous
for Test measure use version below ) was on wrong place. Adding "working hours" to second table - not clear what you want. You already have it some table?
Test =VAR _startdate=SELECTEDVALUE(formatie[date start])VAR _enddate=SELECTEDVALUE(formatie[date end])VAR _employee=SELECTEDVALUE(formatie[Name employee])VAR _Result=CALCULATE([Workin_hours],FILTER('working hours','working hours'[date]>=_startdate && 'working hours'[date]>=_enddate && 'working hours'[Name employee]=_employee))RETURN _result
some_bih
3 years agoCommunity Champion
Hi Anonymous I assume employee belong to some team and there is some table. This table should be connected with relationship and we will see the result. In what table we could find this?
Anonymous
3 years agoNot applicable
Hi som_bih, the problem is the emplyee has several lines because it belognes during time to sevral teams. you get a many to many relationship, els it would be easy.
To get the right team at time hours worked it should look at the date en then find the right team.