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
emiliaexcels
New Member

MAX value of a column in a filtered table

Im looking to find the maximum value of a column in a table where the table has been filtered. so far the MAX() function is only retuning the maximmum for the entire column unfiltered and im having trouble using the FILTER function to get my desired results. basically i just want the max of the displayed values when the column is filtered, not of the entire data set, thanks. 

1 ACCEPTED SOLUTION
AbbasG
Memorable Member
Memorable Member

Here is the sample solution hope it helps (Please download the .pbix file) - emiliaexcels.pbix

To achieve the desired outcome where the maximum value is calculated based on the filtered context, you should use the MAXX function along with the ALLSELECTED function in DAX. The MAXX function allows you to iterate over a table and find the maximum value, while ALLSELECTED respects the current filter context applied in your report.

Sample Dax:

MaxFilteredValue =
MAXX(
VALUES(sample_data[Value]),
CALCULATE(MAX(sample_data[Value]))
)

View solution in original post

1 REPLY 1
AbbasG
Memorable Member
Memorable Member

Here is the sample solution hope it helps (Please download the .pbix file) - emiliaexcels.pbix

To achieve the desired outcome where the maximum value is calculated based on the filtered context, you should use the MAXX function along with the ALLSELECTED function in DAX. The MAXX function allows you to iterate over a table and find the maximum value, while ALLSELECTED respects the current filter context applied in your report.

Sample Dax:

MaxFilteredValue =
MAXX(
VALUES(sample_data[Value]),
CALCULATE(MAX(sample_data[Value]))
)

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
Top Kudoed Authors