Forum Discussion
Anonymous
4 years agoNot applicable
Workday count between two dates
Hi all, Can you help me filter my measure by month? I have an employee-table with start and end-dates and a date table with a workday column where each workday is 1 and all non-workdays are...
- 4 years ago
Anonymous
DATESBETWEEN Removes the filter from the date table. It sepends on your columns but tou may try
Sum of working days = SUMX ( 'Medewerkers', CALCULATE ( SUM ( Kalender[Werkdag] ), DATESBETWEEN ( 'Kalender'[Date], 'Medewerkers'[Datum_in_dienst_dienstjr], 'Medewerkers'[Einddatum_contract] ), VALUES ( Kalender[month] ) ) )
tamerj1
4 years agoCommunity Champion
Anonymous
DATESBETWEEN Removes the filter from the date table. It sepends on your columns but tou may try
Sum of working days =
SUMX (
'Medewerkers',
CALCULATE (
SUM ( Kalender[Werkdag] ),
DATESBETWEEN (
'Kalender'[Date],
'Medewerkers'[Datum_in_dienst_dienstjr],
'Medewerkers'[Einddatum_contract]
),
VALUES ( Kalender[month] )
)
)
Anonymous
4 years agoNot applicable
Thanks, that seems to solve it!
Can you maybe explain why/how this works as a filter? I'm pretty new to DAX and like to learn more about how it works.
Thanks anyhow!
- tamerj14 years agoCommunity Champion
Anonymous
Filters are actually tables. VALUES is also a table therefore, it restores back the Month column in the filter contaxt.