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
Euro0681
Helper II
Helper II

ALLEXCEPT still filtering

I'm having an issue with ALLEXCEPT

Euro0681_0-1671660033366.png

I've created a measure (displayed on the Left table) that calculates Sales Amount for the Previous Year.
The Table on the right shows the same values using a visual filter to filter the table to the previous year (Validation Purposes).
The numbers are correct the issue I'm having is Whenever i add a filter to the table on the left It also filters my measure, I want my measure to retain the same values at all times. Can anyone help?

Measure = 
Calculate ( 
               SUM('Table'[Sales Amount]),
               'Table'[Year] = MAX('Table'[Year])-1,
               AllExcept('Table','Table'[ID]
)

When I Start to filter by 'Table'[Date] It Changes my Numbers, and I believe the reason is because of the filter for Year because when I Filter by 'Date' the 'MAX'[Year] changes causing the calculation to change. So I dont belive the problem is with allexcept, I need a way for the previous year to always remain the same so my calculation stays correct

 

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

Hi @Euro0681 ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_2-1671675850844.png

Please try:

Measure = 
Calculate ( 
               SUM('Table'[Sales Amount]),
               'Table'[Year] = MAXX(ALL('Table'),[Year])-1,
               AllExcept('Table','Table'[ID]
))

Final output:

vjianbolimsft_0-1671675793755.png

vjianbolimsft_1-1671675809223.png

 

Best Regards,

Jianbo Li

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

1 REPLY 1
v-jianboli-msft
Community Support
Community Support

Hi @Euro0681 ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_2-1671675850844.png

Please try:

Measure = 
Calculate ( 
               SUM('Table'[Sales Amount]),
               'Table'[Year] = MAXX(ALL('Table'),[Year])-1,
               AllExcept('Table','Table'[ID]
))

Final output:

vjianbolimsft_0-1671675793755.png

vjianbolimsft_1-1671675809223.png

 

Best Regards,

Jianbo 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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.