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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
adriano321souza
Frequent Visitor

calculate the average

Good Morning!
I have the following problem:
I want to calculate the average of the values ​​shown on the screen from the TOPN filter, that is, when selecting one of the TOPN items to print the average on a card.
Thankful!

Exemple

1 ACCEPTED SOLUTION

Hi @adriano321souza 

Is this problem sloved? 

If it is sloved, could you kindly accept it as a solution to close this case?

If not, please let me know.

 

Best Regards

Maggie

View solution in original post

4 REPLIES 4
adriano321souza
Frequent Visitor

in the top 10 is it possible to show only the values ​​of the first 10 lines?

Hi @adriano321souza 

Is this problem sloved? 

If it is sloved, could you kindly accept it as a solution to close this case?

If not, please let me know.

 

Best Regards

Maggie

Hi @adriano321souza 

It is possible, based on my pbix, 

create a measure

Measure = IF([rank]<=[selected],1,0)

Add this measure in your visual level filter and apply 1

 

Best Regards

Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-juanli-msft
Community Support
Community Support

Hi @adriano321souza 

Please check my pbix,

create measures as below

value = SUM(dRelAtend[Valor])

rank = RANKX(ALL(dRelAtend[Cliente]),[value],,DESC,Dense)

selected = SELECTEDVALUE(TopNTable[TopNValues])

count = CALCULATE(DISTINCTCOUNT(dRelAtend[Cliente]),FILTER(ALL(dRelAtend[Cliente]),[rank]<=[selected]))

sum = SUMX(FILTER(ALL(dRelAtend[Cliente]),[rank]<=[selected]),[value])

average = [sum]/[count]

2.png3.png

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.

Top Solution Authors
Top Kudoed Authors