Forum Discussion
Date Slicer that filters different date fields
- 2 years ago
Hi Daniel_01
Please refer to the linked video tutorials:https://www.youtube.com/watch?v=eiDWMqgKlZI
https://www.youtube.com/watch?v=fOcgIuaJHEs&t=1s
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- 2 years ago
Meanwhile, I found a solution:
I created this measure:
dax_was_active = IF(AND(SUMX(EMP_TABLE, INT(EMP_TABLE[EMPLOYMENT_DATE_START]) - INT(MAXX(DAX_Dates, DAX_Dates[Date]))) <= 0, SUMX(EMP_TABLE, INT(EMP_TABLE[EMPLOYMENT_DATE_LEAVING]) - INT(MIN(DAX_Dates[Date]))) >= 0), "Yes", "No")Then I put this measure on the filter for the table visual, so I can filter by the "Yes". This way my table will only show the active employees during that period, and with the relation between the dax_dates table and the absences table it shows the correct number of absences per employee.This was quite simple after all, sorry for bothering you.
Hi Daniel_01
Please refer to the linked video tutorials:
https://www.youtube.com/watch?v=eiDWMqgKlZI
https://www.youtube.com/watch?v=fOcgIuaJHEs&t=1s
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi Ritaf1983 !
Thank you for replying. These videos don't answer my solution, however. The goal of the videos is to find people who have entered or left in those dates.
My goal, however, is to filter who was active during that period and know their absent days.
For example: I filter the dates between 2023.01.01 - 2023.06.31 (1st semester) and the visual table should show me all employees who were active during that period, even if just for a day (so their start date should be before 2023.06.31, and their leave date should be after 2023.01.01) and should tell me the number of days people were absent during that same period.
Sorry if I wasn't clear! I hope this clears things up.