Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

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 should complete all the Competencies(Reviews,Risks,deployment,services,agile) and the level should be Qualified. 

QualifiedEmployees =
CALCULATE (
    COUNTROWS ( 'New New FINAL' ),
    'New New FINAL'[Job Code] = "QC-01",
    'New New FINAL'[Level] = "Qualified",
    'New New FINAL'[EmployeeId] IN VALUES ( 'New New FINAL'[EmployeeId] ),
    'New New FINAL'[Name competency] = "Reviews" &&
    'New New FINAL'[Name competency] = "Risks" &&
    'New New FINAL'[Name competency] = "deployment" &&
    'New New FINAL'[Name competency] = "Services" &&
    'New New FINAL'[Name competency] = "Agile"
)

 

New New Final Table (Example)

| EmployeeId | Job Code | Level | Name competency |
|------------|----------|-----------|-----------------|
| 1 | QC-01 | Qualified | Reviews |
| 1 | QC-01 | Qualified | Risks |
| 1 | QC-01 | Qualified | deployment |
| 1 | QC-01 | Qualified | Services |
| 1 | QC-01 | Qualified | Agile |
| 2 | QC-01 | Qualified | Reviews |
| 2 | QC-01 | Qualified | Risks |
| 2 | QC-01 | Qualified | deployment |
| 2 | QC-01 | Qualified | Services |
| 3 | QC-01 | Qualified | Reviews |
| 4 | QC-01 | Qualified | Reviews |
| 4 | QC-01 | Qualified | Services |
| 5 | QC-01 | Qualified | Reviews |
| 5 | QC-01 | Qualified | deployment |

 

 

So based on the DAX query written  The Output should be Count of employees who has complted all the competencies
Therefore in this case its 1. because only person has complted all the 5 competencies

Please help me with this issue 
Thanks 😊.

2 ACCEPTED SOLUTIONS
some_bih
Super User
Super User

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 )




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

Proud to be a Super User!






View solution in original post

ThxAlot
Super User
Super User

comp.pbix

 

One measure is enough to do the trick

ThxAlot_0-1689247169807.png

comp.xlsx

 

For fun only, a showcase of powerful Excel formulas,

ThxAlot_1-1689252046592.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



View solution in original post

2 REPLIES 2
ThxAlot
Super User
Super User

comp.pbix

 

One measure is enough to do the trick

ThxAlot_0-1689247169807.png

comp.xlsx

 

For fun only, a showcase of powerful Excel formulas,

ThxAlot_1-1689252046592.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



some_bih
Super User
Super User

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 )




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

Proud to be a Super User!






Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.