Forum Discussion
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.
3 Replies
- amitchandakSuper User
Fro88er , how to break tie in Rank
https://databear.com/how-to-use-the-dax-rankx-function-in-power-bi/
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415 - V-lianl-msftCommunity 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.- Fro88erHelper IVI 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).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])))ReturnIF(AND('JO/SO Recruiter'[appointmentID] = IsFirstAptID,'JO/SO Recruiter'[dateBegin] = IsFirstDate),1,0)