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

How can I dynamically highlight min and max from a table visual

Hey,

 

How can I highlight the max and min value of a table visual and that also these value changes when filters are applied to the table?

 

Imagine you have a table with two columns: Month name and Total sales, What I need is a measure that returns the value of the max value from the current filter context, let's say the our best month this year was June 2023, I want the measure to show June's sales value, but if I apply a filter for product category, and choose let's say "Product A", I'd like to have the max value updated for Product A too, and any other filter that we could apply.

 

Does this make sense? Let me know if you'd require a dataset

4 REPLIES 4
HKInd
Helper I
Helper I

@info_algoritmia 

You should attach PBIX sample file with issue everytime which will help others to understand your query quickly and solve that in your file itself.

 

As I understand your query: you can follow below steps

1. Create a measure for MaxSales:

Max Sales = MAXX(ALLSELECTED(YourTable), YourTable[Total sales])

2. Create a measure or month name with maxSales

Max Sales Month =

VAR MaxSales = [Max Sales]

RETURN

CALCULATE( MAX(YourTable[Month name]), FILTER(ALLSELECTED(YourTable), YourTable[Total sales] = MaxSales) )

 

Now you can use these measures in your report

Thanks for the idea @HKInd  but what I require is something like this

info_algoritmia_1-1692628824903.png

Just a table visual with dates (it could be weeks, months, etc.) with the Total sales, and the new measure to always return the highest value of sales based on the current data shown in the table, modified by filters too

Ritaf1983
Super User
Super User

Hi @info_algoritmia 
You can create measures for minimum and maximum and base them modify conditional formatting.
something like that:

Ritaf1983_0-1692602167915.png

To have this functionality I created 3 measures :

1. Total breakdowns 

Total breakdowns = sum('Table'[Brakdowns])
2. For maximum by machine
max breakdowns = CALCULATE(max ('Table'[Brakdowns]),ALLEXCEPT('Table','Table'[Machine]))
3. condition for formatting
condition = if([max breakdowns]=[Total breakdowns],1,0)
Ritaf1983_1-1692602342235.png

Link to a sample with heat map as a bonus 🙂 

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thanks for the idea @Ritaf1983  but what I require is something like this

info_algoritmia_2-1692629075059.png

 

Just a table visual with dates (it could be weeks, months, etc.) with the Total sales, and the new measure to always return the highest value of sales based on the current data shown in the table, modified by filters too

Helpful resources

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

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.

Top Solution Authors
Top Kudoed Authors