The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.