Forum Discussion
Using SWITCH to put candidates into categories, however ...
- 5 years ago
My apologies - I did it backwards. We just need to change the MAX to MIN and <= to >=
Total Candidates = CALCULATE ( COUNTA ( Candidates[Candidate] ), FILTER ( ALL ( Statuses ), Statuses[Idx] >= MIN ( Statuses[Idx] ) ) )David
Hi Anonymous -
Create a dimension table for your statuses like this
| Idx | Status |
|---|---|
| 1 | Review |
| 2 | Screen |
| 3 | Interview |
| 4 | Reference Check |
| 5 | Offer |
| 6 | Ready for Hire |
For the column "Status" do "Sort By Column" on Idx
In your model, link Status with whichever Status field on the candidate record you want to key off of. This should be 1-to-Many (Status to Candidate)
Then your measure will be
Total Candidates =
CALCULATE (
COUNTA ( Candidates[Candidate] ),
FILTER ( ALL ( Statuses ), Statuses[Idx] <= MAX ( Statuses[Idx] ) )
)
Hope this helps
David
- Anonymous5 years agoNot applicable
Thank you David this is wonderful help. I have a clarifying point. Based on the Candidate's A thru H included as examples, according to my needs the counts shoudl be:
Review: 8Screen: 6
Interview: 4
Reference: 3
Offer: 2
Ready for Hire: 1
I likely miscommunicated about the candidate stage progression. "Ready for Hire" is the last stage and thus b/c we only have one candidate at that stage there is only one count there. For "Offer", as the penultimate stage, the count is 2 (one for the candidate at "Offer" and then another count for the candidate just mentioned who progressed to the final stage "Ready for Hire".)
Based on this, how might I shift the needed measure to count accurately? Again, thank you.- dedelman_clng5 years ago
Community Champion
My apologies - I did it backwards. We just need to change the MAX to MIN and <= to >=
Total Candidates = CALCULATE ( COUNTA ( Candidates[Candidate] ), FILTER ( ALL ( Statuses ), Statuses[Idx] >= MIN ( Statuses[Idx] ) ) )David
- Anonymous5 years agoNot applicable
Great, thank you for the quick reply. I am close but for some reason still off. I am getting the straightforward count at each stage, rather than the cumulative progressive count.
And I cannot get this thing to sort for some reason despite having done this:
and this: