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! Learn more

Reply
shyang5
Regular Visitor

formatting Color doesn't work with data label in line chart but works in matrix

In my case, I want to show Max & Min in line chart & matrix table.
It works fine in matrix, but doesn't work with data label in line chart.

shyang5_0-1681114200556.png

 

 

 

Max of value by month = 
CALCULATE(MAXX(
    SUMMARIZE(ALL(Sheet1),'Sheet1'[month]),'Sheet1'[sum_value])
    ,REMOVEFILTERS(Sheet1[Sort of month]))

Mix of value by month = 
CALCULATE(MINX(
    SUMMARIZE(ALL(Sheet1),'Sheet1'[month]),'Sheet1'[sum_value])
    ,REMOVEFILTERS(Sheet1[Sort of month]))

Color_format_MAX&MIN_value = 
IF('Sheet1'[sum_value] = 'Sheet1'[Max of value by month] , "Red",
    IF('Sheet1'[sum_value] = 'Sheet1'[Mix of value by month], "Green",
        "black"))

 

 

 

please kindly help

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @shyang5 ,

I have created a simple sample, please refer to my pbix file.

Measure = var _max=MAXX(ALL('Table'),'Table'[VALUE])
var _min=MINX(ALL('Table'),'Table'[VALUE])
return
IF(_max=MAX('Table'[VALUE]),_max,IF(_min=MAX('Table'[VALUE]),_min,BLANK()))

vrongtiepmsft_0-1681264198611.pngvrongtiepmsft_1-1681264209464.png

 

vrongtiepmsft_2-1681264227224.png

Or you can vote here:Conditional formatting for lines in Line Chart 

Line Chart Marker Color Conditional Formatting 

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

2 REPLIES 2
Anonymous
Not applicable

Hi @shyang5 ,

I have created a simple sample, please refer to my pbix file.

Measure = var _max=MAXX(ALL('Table'),'Table'[VALUE])
var _min=MINX(ALL('Table'),'Table'[VALUE])
return
IF(_max=MAX('Table'[VALUE]),_max,IF(_min=MAX('Table'[VALUE]),_min,BLANK()))

vrongtiepmsft_0-1681264198611.pngvrongtiepmsft_1-1681264209464.png

 

vrongtiepmsft_2-1681264227224.png

Or you can vote here:Conditional formatting for lines in Line Chart 

Line Chart Marker Color Conditional Formatting 

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

shyang5_0-1681400366837.png

it works now
thank for giving me the solution

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