Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Need help for a DAX Query

Hello Community,   I am trying to find the count of employees who are fully competent. You can say an employee is fully competent when, For Distinct Job code, For Distinct Site the employee sho...
  • some_bih's avatar
    3 years ago

    Hi Anonymous possible solution, not totaly eleagant but I think is working.

    Create two measures: Num of comp and # Employes qualified,  adjust Sheet2 to your table name

    Assumption: number of commpetence is 5 to count employess.

     

    Did I answer your question? Mark my post as a solution! Kudos Appreciated!

    Num of comp =
    DISTINCTCOUNT ( Sheet2[Name competency] )
     
    # Employes qualified =
    VAR _qualiefied_table =
        SUMMARIZE ( FILTER ( Sheet2, Sheet2[Level] = "Qualified" ), Sheet2[EmployeeId] )
    VAR _filtered_table =
        //number of competencies set to 5
        FILTER (
            ADDCOLUMNS ( _qualiefied_table, "@Number Name comp", [Num of comp] ),
            [@Number Name comp] = 5
        )
    RETURN
        COUNTROWS ( _filtered_table )
  • ThxAlot's avatar
    3 years ago

    comp.pbix

     

    One measure is enough to do the trick

    comp.xlsx

     

    For fun only, a showcase of powerful Excel formulas,