Forum Discussion

Madhans's avatar
Madhans
Frequent Visitor
3 years ago
Solved

DAX Help - Mandays Calculation

I have one fact table containing  Employee Clm, Joining-date Clm, Relieving-date Clm   And one calendar table.   Need to have the number of days in the particular period as below attached...
  • Jihwan_Kim's avatar
    3 years ago

    Hi,

    Please check the below picture and the attached pbix file.

     

     

     

     

     

    expected outcome measure: =
    COUNTROWS (
        FILTER (
            'Calendar',
            'Calendar'[Date] >= MAX ( Employee[Joined Date] )
                && IF (
                    NOT ISBLANK ( MAX ( Employee[Relieving Date] ) ),
                    'Calendar'[Date] <= MAX ( Employee[Relieving Date] ),
                    MAX ( 'Calendar'[Date] )
                )
        )
    )