Forum Discussion
Daniel_01
2 years agoNew Member
Date Slicer that filters different date fields
I have a Date table, using CALENDARAUTO(). I need to be able to have a date slicer (between dates type) using this table that will filter 3 things: 1 - Absent days (this is a table that st...
- 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.
Daniel_01
2 years agoNew Member
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.