Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Count if DAX Help :)

Hello all,   I have two tables, fBrazilBadge (badge swipes for brazil) and fHeadcount (global employee records). fBrazilBadge is linked to a date table. So far I have validated that I am getting th...
  • Mikelytics's avatar
    3 years ago

    so I assume that in the headcoun table each employee has only one assgigned location. The measure could look like this

     

    Batch-In Count of employees =
    SUMX(
       BatchTable,
       CALCULATE(
          IF(SELECTEDVALUE(BatchTable[Location ID] = SELECTEDVALUE(HeadCountTable[Location ID],1,0)
       )
    )
       

     

    But for my current understanding you would nee to creat the relation via the employee table because you want to check whether the employee batches withint the home location.

     

    Best regards

    Michael

    -----------------------------------------------------

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

    @ me in replies or I'll lose your thread.