Forum Discussion

anonymoususer92's avatar
2 years ago
Solved

Understanding Headcount (Dax for Allexcept, All)

Hi All,   I have been tasked with creating a report that tracks headcount, attendance, etc. for employees.  The first phase is understanding headcount - ie, how many people are coming onsite for...
  • Anonymous's avatar
    Anonymous
    2 years ago

    HI anonymoususer92 ,

     

    Thanks rajendraongole1  for the quick reply. I have some other thoughts to add:

    1. This is my test data.  

    2.We can create a column.

    EnterBadgeDate = DATEVALUE([EnterBadgeTime])

    3.We can create a date table.

    Date = ADDCOLUMNS(CALENDAR(DATE(2024,1,1),DATE(2024,12,31)),"quarter",QUARTER([Date]),"month",MONTH([Date]),"weeknum",WEEKNUM([Date],2))

    4. We can create a measure.

    UniqueBadgeIns = 
    CALCULATE(
        DISTINCTCOUNT('Badging Data'[EmployeeID]),ALLSELECTED('Badging Data'))

    5.Then the result is as follows.

    If I've misunderstood you please point it out in a follow-up reply.

     

    Best Regards,

    Neeko Tang

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

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi anonymoususer92 ,

     

    Try to:
    1. Change the model relationship to a one-to-many relationship in one direction
    2. Click the [employee name+id] slicer and set the interaction to "None" on the card visual.

    Change how visuals interact in a report - Power BI | Microsoft Learn

    If that doesn't help, please provide your PBIX file (please note the protection of private data).

     

    Best Regards,

    Neeko Tang

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