Forum Discussion
DAX Filtering
Hi All
EDIT: (changed question format)
I have two tables:
Employee information on what position he worked at period of time.
| EmployeeID | Position | ValidFrom | ValidTo |
| 1 | Engineer | 01/01/2014 | 01/12/2016 |
| 1 | Manager | 01/12/2016 | 31/12/2154 |
Employee workhours table by dates
| EmployeeID | Hours | Date |
| 1 | 10 | 01/02/2014 |
| 1 | 10 | 02/02/2014 |
| 1 | 10 | 03/02/2014 |
| 1 | 10 | 07/02/2014 |
| 1 | 10 | 08/02/2014 |
| 1 | 10 | 08/02/2018 |
| 1 | 10 | 09/02/2018 |
| 1 | 10 | 10/02/2018 |
| 1 | 10 | 15/02/2018 |
| 1 | 10 | 16/02/2018 |
How can i get the correct or current time employee postion to workhours table?
I know i have to check : IS Workhours.Date between ValidFrom and ValidTo ,If TRUE -> Get me Postion value
How to put it in DAX. Thank you.
For me the topic is not finished for finding solution with DAX - but for now I solved the problem using SQL.
Thanks..
2 Replies
- Greg_DecklerCommunity Champion
Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
- rivo201Helper I
For me the topic is not finished for finding solution with DAX - but for now I solved the problem using SQL.
Thanks..