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

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

Reply
Anonymous
Not applicable

Calculated AVG Line - show only one value

Hi All,

 

I have the following bar chart that show sales oper sales person:

DinEileen_0-1668679876715.png

So the data is here filtered for 2022 and for a region. This region for example has 4 Salesman. I added an average line as a measure which caclulates basically: whole sales (from all regions)/all salesman

Now I have this line but it shows everytime the same value. Is it possible to only show the value once, like at the end? Otherwise there are so much numbers....

 

Thanks and best regards 🙂

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Anonymous ,

I created some data:

vyangliumsft_0-1668740278952.png

Here are the steps you can follow:

1. Create calculated table.

Table 2 =
SUMMARIZE('Table','Table'[Region],'Table'[Salesman])

vyangliumsft_1-1668740278954.png

2. Create calculated column.

Rank =
RANKX(FILTER('Table 2','Table 2'[Region]=EARLIER('Table 2'[Region])),'Table 2'[Salesman],,ASC)

vyangliumsft_2-1668740278954.png

3. Create measure.

Avg =
AVERAGEX(ALL('Table'),'Table'[Amount])
Measure =
var _region=SELECTEDVALUE('Table'[Region])
var _max=MAXX(FILTER(ALL('Table 2'),'Table 2'[Region]=MAX('Table 2'[Region])),[Rank])
var _maxSalesman=MAXX(FILTER(ALL('Table 2'),'Table 2'[Rank]=_max&&'Table 2'[Region]=_region),[Salesman])
var _allmax=MAXX(ALL('Table 2'),[Rank])
var _allmaxSalesman=MAXX(FILTER(ALL('Table 2'),'Table 2'[Rank]=_max),[Salesman])
return
    IF(
       HASONEVALUE('Table'[Region])&&
    MAX('Table'[Salesman])=_maxSalesman,[Avg],
    IF(
   NOT( ISINSCOPE('Table'[Region]))&&MAX('Table'[Salesman])=_allmaxSalesman,[Avg],
    BLANK()))

4. Result:

vyangliumsft_3-1668740278958.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi  @Anonymous ,

I created some data:

vyangliumsft_0-1668740278952.png

Here are the steps you can follow:

1. Create calculated table.

Table 2 =
SUMMARIZE('Table','Table'[Region],'Table'[Salesman])

vyangliumsft_1-1668740278954.png

2. Create calculated column.

Rank =
RANKX(FILTER('Table 2','Table 2'[Region]=EARLIER('Table 2'[Region])),'Table 2'[Salesman],,ASC)

vyangliumsft_2-1668740278954.png

3. Create measure.

Avg =
AVERAGEX(ALL('Table'),'Table'[Amount])
Measure =
var _region=SELECTEDVALUE('Table'[Region])
var _max=MAXX(FILTER(ALL('Table 2'),'Table 2'[Region]=MAX('Table 2'[Region])),[Rank])
var _maxSalesman=MAXX(FILTER(ALL('Table 2'),'Table 2'[Rank]=_max&&'Table 2'[Region]=_region),[Salesman])
var _allmax=MAXX(ALL('Table 2'),[Rank])
var _allmaxSalesman=MAXX(FILTER(ALL('Table 2'),'Table 2'[Rank]=_max),[Salesman])
return
    IF(
       HASONEVALUE('Table'[Region])&&
    MAX('Table'[Salesman])=_maxSalesman,[Avg],
    IF(
   NOT( ISINSCOPE('Table'[Region]))&&MAX('Table'[Salesman])=_allmaxSalesman,[Avg],
    BLANK()))

4. Result:

vyangliumsft_3-1668740278958.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

amitchandak
Super User
Super User

@Anonymous , Create a measure like

 

calculate(averagex(Values(Table[Salesman]), [Sales]) , allselected())

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
Anonymous
Not applicable

HI ,@amitchandak,

I have my average already. I want that the data label only appears ones.

 

Thanks and BR

Helpful resources

Announcements
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