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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
dataprofile
New Member

Retrieve count of candidates based on criteria.

Hi! 

I have a table(candidates_table) with candidate id, application id and candidate stage. The table looks as follows: 

candidate_id      | application_id      | Candidate_stage

1                          CAND-1                  Interview

1                          CAND-1                  Offer

1                          CAND-1                  Ready for Hire

2                          CAND-2                  Interview

2                          CAND-2                  Offer

I'm trying to create dax code to retrieve the distinct count of candidates that made it to the Candidate Stage "Offer" but didn't make it to the "Ready for Hire" stage (in this case the count would be 1=candidate 2). Any ideas would be appreciated! Thanks!

1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

CNENFRNL_0-1665105244505.png

 

For fun only, a showcase of powerful Excel worksheet formula; btw, I'm just got hired with decent salary by a big company for my proficiency in Excel.🤣

CNENFRNL_1-1665107210121.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

2 REPLIES 2
MahyarTF
Memorable Member
Memorable Member

Hi,

You could create the 2 separate tables for the Offer and Ready for Hire separately :

1- 

OfferTable = CALCULATETABLE(
                            SELECTCOLUMNS(sheet228,
                                          "Candidate_Id", Sheet228[candidate_id],
                                          "Application_Id", Sheet228[application_id]),
                           Sheet228[Candidate_stage] = "Offer")
2- 
ReadyforHireTable = CALCULATETABLE(
                            SELECTCOLUMNS(sheet228,
                                          "Candidate_Id", Sheet228[candidate_id],
                                          "Application_Id", Sheet228[application_id]),
                           Sheet228[Candidate_stage] = "Ready for Hire")
And then create a measure in your main table as below : 
CandOffer =
Var result = COUNTROWS(OfferTable) - COUNTROWS(ReadyforHireTable)
return result
- Now you have the Candidate separately and the count you mentioned in your post.
Thanks for your Kudos
Please mark it as solution if it helps you
Mahyartf
CNENFRNL
Community Champion
Community Champion

CNENFRNL_0-1665105244505.png

 

For fun only, a showcase of powerful Excel worksheet formula; btw, I'm just got hired with decent salary by a big company for my proficiency in Excel.🤣

CNENFRNL_1-1665107210121.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors