Forum Discussion
calculation with dates
- 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
Hi Anonymous still, one employee belong to only one team at certain day? Or...
Hi some_bih, that is right.
Do you know how I can add a column to the table below?
Table working hours:
| Name employee | date | working hours |
| Magret | 5-1-2023 | 3 |
| Magret | 8-1-2023 | 5 |
| Magret | 15-1-2023 | 6 |
| Magret | 16-1-2023 | 2 |
| Magret | 25-1-2023 | 6 |
| Magret | 29-1-2023 | 4 |
| Magret | 17-2-2023 | 8 |
| Magret | 18-2-2023 | 4 |
| Magret | 8-3-2023 | 8 |
| Magret | 15-3-2023 | 8 |
| Magret | 16-3-2023 | 6 |
There is a many to many relationship between the table "working hours" and "employee"/
For every line in the new column it need to look in the table "employee" at which team the employee belongs at a certain day.
Do you have a suggestion?
- some_bih3 years agoCommunity Champion
Hi Anonymous please share file with me so I can see overall model. Describe wanted solution so I can check what I can do.
- Anonymous3 years agoNot applicable
some_bih , How can I share the pbix file with you?
- some_bih3 years agoCommunity Champion
Anonymous try DM(right upper corner)