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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Fro88er
Helper IV
Helper IV

How to create a new measure using RANKX and second measure for tiebreakers

I am running a contest and therfore, trying to create a meaure that puts a "1" for the top two RANK by recruiter using the JOs as tie breakers, so I can add a "star" for them. (I could only get one to work using the top JO).  Basicly, measure the top JO by Rank, only top two Rank.

 

ContestHelp.JPG

 

RankPlacements - by Team Individual Full Desk =
RANKX(
ALLSELECTED('DimCorporateUser_ Recruiter'),
CALCULATE([Total Placements]),,DESC,Dense)
 
JO Recruiter =
CALCULATE(SUM('JO/SO Recruiter'[JO Calc])
)
 
Thanks kindly,
Mark
3 REPLIES 3
V-lianl-msft
Community Support
Community Support

Hi @Fro88er ,

 

What is the formula of [total places]? Could you paste some sample data?

Please mask any sensitive data before uploading

 

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

I looked at the video material you provided.  I still can't get the Rank to add the JO Logic. The JO is referencing an appointments table. Basicly, count the Placements/deals and if tied default to the number of JOs (apointments).
 
ContestHelp2.JPG
 
Total Placements = CALCULATE([Perm Placement Count]+[Temp Placement Count])
 
Perm Placement Count =
CALCULATE(
COUNTROWS('Placements Recruiter'),
FILTER('Placements Recruiter','Placements Recruiter'[employmentType]="Direct Hire" || 'Placements Recruiter'[employmentType]="Direct Hire-Converted"),
FILTER('Placements Recruiter','Placements Recruiter'[Perm Revenue Calc] > 5000),
FILTER('Placements Recruiter','Placements Recruiter'[fee] > 0),
FILTER('Placements Recruiter','Placements Recruiter'[salary] > 0)
)

Temp Placement Count =
CALCULATE(
COUNTROWS('Placements Recruiter'),
FILTER('Placements Recruiter','Placements Recruiter'[employmentType]="Contract" || 'Placements Recruiter'[employmentType]="VMS")
)
 
JO Recruiter =
VAR IsFirstAptID =
IF('JO/SO Recruiter'[type] = "Interview",
CALCULATE(
MIN('JO/SO Recruiter'[appointmentID]),
ALLEXCEPT('JO/SO Recruiter','JO/SO Recruiter'[dateBegin], 'JO/SO Recruiter'[jobOrderID])
),0)
VAR IsFirstDate =
IF('JO/SO Recruiter'[type] = "Interview",
CALCULATE(
MIN('JO/SO Recruiter'[dateBegin]),
ALLEXCEPT('JO/SO Recruiter','JO/SO Recruiter'[jobOrderID],'JO/SO Recruiter'[type])))
Return
IF(AND('JO/SO Recruiter'[appointmentID] = IsFirstAptID,'JO/SO Recruiter'[dateBegin] = IsFirstDate),1,0)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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