Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi, I am calculating the contribution margin in the "Service" table using the following measure:
DB per FTE =
DIVIDE([Revenues minus salary costs], SUM('PersonnelDataCombined'[FTE yearly]))
I now want to get an average of the two best values (per year) as a target. I have already tried with the Rankx formula:
Rank = rankx(all('locations'[district]),[DB per FTE])
and thus get the rank as well.
But how can i now display the sum of the two best values in each case divided by 2 as a measure or value?
Solved! Go to Solution.
Hi, @GeorgW
Please try the below.
average of top2 =
AVERAGEX (
TOPN ( 2, ALL ( 'locations'[district] ), [DB per FTE], DESC ),
[DB per FTE]
)
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Thank you!
Hi, @GeorgW
Please try the below.
average of top2 =
AVERAGEX (
TOPN ( 2, ALL ( 'locations'[district] ), [DB per FTE], DESC ),
[DB per FTE]
)
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
User | Count |
---|---|
98 | |
76 | |
74 | |
49 | |
26 |