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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Ignoring axis context for a measure in chart

I´m trying to use ALLEXCEPT to delete the context for the axis in a chart but not getting there.

Given this data:

allexcept1.PNGallexcept2.PNG

 

I´d like to add a line that shows the average of value across all categories.

I thought that was the use for ALLEXCEPT, the average measure i´m using is:

Average = CALCULATE(SUM(Table1[Value]) / DISTINCTCOUNT(Table1[Category]); ALLEXCEPT(Table1; Table1[Category]))

What am i missing?

 

EDIT: I should add, there are other fields filtering this visual, so I can´t use ALL, i.e., something like 

Average = SUMX(ALL(Table1);Table1[Value]) / CALCULATE(DISTINCTCOUNT(Table1[Category]); ALL(Table1))

will not work. I want every other filter to be respected except for the X axis.

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

To use the formula as below.

 

Average = 
CALCULATE (
    SUM ( Table1[Value] ) / DISTINCTCOUNT ( Table1[Category] ),
    ALLSELECTED ( Table1 )
)

 

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

To use the formula as below.

 

Average = 
CALCULATE (
    SUM ( Table1[Value] ) / DISTINCTCOUNT ( Table1[Category] ),
    ALLSELECTED ( Table1 )
)

 

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Yes, that seems to work great @v-frfei-msft , thanks a lot!

 

Now it seems clear 

ALLSELECTED ( Table1 )

is the key Smiley Tongue

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.

Top Solution Authors