Forum Discussion

AnonymousUser's avatar
AnonymousUser
Frequent Visitor
3 years ago
Solved

Dax Measure for selecting a value in a specific column based on dates

Hello,  I'm having problems wrinting a measure in dax. I have a fact table "EmployeeMD" that has all the employees and the working positions that they now have or had in the past. Every position h...
  • v-yueyunzh-msft's avatar
    3 years ago

    Hi , AnonymousUser 

    According to your description , you want to to have the count of a single fte value that corresponds with the month and year when the matrix is collapsed.

    I test in my side , here are the steps you can refer to :

    (1)This is my test data :

    (2)I create a measure as the same as yours, the result is as follows:

    (3)For your need , we can just create another measure based on the orginal measure you created:

    Measure = SUMX( ADDCOLUMNS( CROSSJOIN( VALUES('EmployeeMD'[PositionStartdate]) ,VALUES('EmployeeMD'[PositionEnddate])) ,"V" , [FTECount]) , [V])

    Then we can meet your need , the result is as follows:

     

    Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

     

    Best Regards,

    Aniya Zhang

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