Forum Discussion

Decal's avatar
Decal
Icon for Helper I rankHelper I
2 years ago
Solved

DAX Measure to Average Terminations by Month

Seems like this should be simple, but I'm having a heck of a time.   I have an Employee table (dimWorker) with a field [Term Date}.  I have a Date table (dimDate) with the date and the [Month Name]...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi, Decal 

    Thank you very much for your reply, as well as the sample data provided. Here's the sample data I used:

    Here's your DAX expression:

    Based on this, I built another DAX expression as shown in the following image:

    Terminations =
    IF (
        ISINSCOPE ( dimDate[Date].[Year] ),
        [Terminations (Dynamic)],
        SUMX ( ALLSELECTED ( 'dimDate'[Date].[Year] ), [Terminations (Dynamic)] )
    )
    

    When I select the corresponding year in the slicer, total updates correctly:

    I've provided the PBIX file used this time below.

     

     

     

     

    How to Get Your Question Answered Quickly

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

    Best Regards

    Jianpeng Li

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.