The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi All,
I have a requirement to calculate Percentile (Quartile1) for all the employees in same Line of Business and at same management level (peer) for a metric (Utilization) when filtered on a particular Employee name (consider its LineofBusinessLinkKey when filtered on a particular employee) as shown below:
So, in the above screenshot, If user selects Amar, then calculate Quartile 1 for the utilization values for Consulting:Senior Associate.
this is my dax
Hi @Saloni_Gupta
Please try the following Dax:
Utilization - 25th Quartile =
VAR SelectedEmployeeName = SELECTEDVALUE('Employee Info'[Full Name])
VAR SelectedEmployeeLOB =
CALCULATE(
MAX('Employee Info'[LineofBusinessLinkKey]),
'Employee Info'[Full Name] = SelectedEmployeeName
)
VAR Peers =
FILTER(
ALL('Employee Info'),
'Employee Info'[LineofBusinessLinkKey] = SelectedEmployeeLOB
)
VAR Quartile1 =
PERCENTILEX.INC(
Peers,
[Utilization],
0.25
)
RETURN Quartile1
If the problem persists, please provide sample data that fully covers your issue (in the form of table or pbix file) and the expected outcome based on the sample data you provided. Please remove any sensitive data in advance.
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
65 | |
62 | |
60 | |
53 | |
30 |
User | Count |
---|---|
181 | |
82 | |
67 | |
48 | |
44 |