Forum Discussion

northshorehiker's avatar
northshorehiker
New Member
6 years ago
Solved

Count based on date compared to two fields in another table

I have a table containing a list of "week ending" dates. I have another table of employees, including their hire and termination dates. I'd really like to add a calculated column to the table of date...
  • mwegener's avatar
    6 years ago

    Something like this?

     

    No of Employees =
    CALCULATE (
        COUNT ( employee[employee] ),
        FILTER (
            employee,
            AND (
                employee[hire date] <= 'week ending'[week ending],
                employee[termination date] > 'week ending'[week ending]
            )
        )
    )

     

    If I answered your question, please mark my post as solution, this will also help others.

    Please give Kudos for support.