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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

TOPN of averages

Hi guys i've seen a lot of posts about averageing the TOPN values, but in my case i want TOPN to show me in a Card the best performing [Specification] in terms of their average [total hours].

 

I've been playing with this but it returns a blank.

 

Top Specification =
calculate(SELECTEDVALUE('Batch Details'[Specification]),
TOPN(1, ALL('Batch Details'),AVERAGEX(TOPN(1,'Batch Details','Batch Details'[Total Hours],DESC),'Batch Details'[Total Hours]),DESC))
 
How can i manage this? I'd like perhpas 3 x different cards showing me the best specifications in terms of their average total hours.
 
Thanks in advance.
2 REPLIES 2
Anonymous
Not applicable

Thanks Amit. I'm fine with the average calculation. I just wanted to show on a card the specification that relates to the highest average. The workaround i've found waas to use a table instead and filter it with a RankX on the average.

amitchandak
Super User
Super User

@Anonymous , Try measures like

 

total Hours = sum('Batch Details'[Total Hours])

 

TOP 10/N =

CALCULATE(averageX(VALUES('Batch Details'[Specification]),[total Hours ]),TOPN(10,all('Batch Details'[Specification]),[total Hours],DESC))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.