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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Paulyeo11
Impactful Individual
Impactful Individual

Color last bar expression need to place at where ?

Hi All

I have below expression from Mr Amit , working fine last time , it will help me color the last bar to Red :-

Color Last Bar = var _max = maxx(ALLSELECTED('Date'), 'Date'[YrMth Sort]) return if(max('Date'[YrMth Sort]) = _max, "Red")
I try to put the expression at legend of the chart , it does not work , i try data color also not working. Can some one share with me where i go wrong ?
Paul
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Hi@Paulyeo11 ,  This you can only use in data color. Not as a legend. Also conditional formatting in case of Bar Visual will not work with Legend

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

Hi@Paulyeo11 ,  This you can only use in data color. Not as a legend. Also conditional formatting in case of Bar Visual will not work with Legend

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.