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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
badger123
Resolver I
Resolver I

Highlight max value in column chart

Hi all,
 
I'm trying to figure out how to highlight the max value in my simple column chart. E.g. here I would like Feb 2019 bar to be a different colour from the rest. Please can someone help? 
 
Capture.PNG
 
I have got this so far: 
 
Measure1=
VAR MAXValue = MAXX( ALL( 'Table1'[Short_Date]), [Sum_Values] )
VAR TotalValues= [Sum_Values]
RETURN
IF(TotalValues= MAXValue, BLANK(), TotalValues)
 
Measure2=
VAR MAXValue = MAXX( ALL( 'Table1'[Short_Date]), [Sum_Values])
RETURN
IF( [Sum_Values] = MAXValue, MAXValue, BLANK() )
 
Where Sum_Values is a simple sum measure. Short_Date is a custom column I made to format the date in MMM-YYYY.
 
This isn't working for some reason. Please help! 🙂 
 
5 REPLIES 5
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @badger123,

 

The second one should work. Please refer to my test and the snapshot.

Measure =
VAR maxSales =
    MAXX ( ALLSELECTED ( 'Calendar'[Short_Date] ), [Sum_Values] )
RETURN
    IF ( [Sum_Values] = maxSales, [Sum_Values], BLANK () )

Highlight-max-value-in-column-chart

 

 

Best Regards,

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

Thanks @v-jiascu-msft for this. I tried following the steps but for some reason it's not working as expected. Do you know why this is? Is it because my Short_Date is text not date? When I use an actual date column it works. Is there a way I can format date MMM-YYYY?

 

Capture.PNG

Hi @badger123,

 

The Short_Date in such a format is surely a Text. It should be from an independent date table. I guess yours is from the fact table which contains the Values column. Isn't it? If so, I would suggest you create a new date table and establish relationships.

 

 

Best Regards,

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

MMM-YYYY default option is not possible but MMMM yyyy is:

 

2019-02-07 11_08_15-05-01-Project-Population-Start - Power BI Desktop.png

Hi @SJim ,

 

Could you please mark the proper answers as solutions?

 

 

Best Regards,

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.