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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
VagelisVlachos
Frequent Visitor

Change color in Clustered column chart.

In a clustered column chart i have for season 2023 the year 2022 and year 2023 that the revenue will fall in 2023 and  for every year i have the weeks.i want to change the color in this year and the year before in a single clustered column chart.

i have this measure that i made it to put it in the conditional formating in the field value but i get 1 color for 2022 and 2023.
WeeksBeforeCurrentYear =
VAR SelectedYear = MIN('BI_ReservationHeader'[resday])
RETURN
    IF(YEAR(TODAY()) >  SelectedYear, "#D6D600", "#BC1000")

 

 

Can anybody help please.

 

thank you

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @VagelisVlachos 

 

You can try the following methods.
Sample data:

vzhangti_0-1678944719001.png

Date Table:

vzhangti_1-1678944745937.png

Measure:

WeeksBeforeCurrentYear = 
VAR SelectedYear = SELECTEDVALUE('Date'[Year])
RETURN
IF(YEAR(TODAY()) >  SelectedYear, "#D6D600", "#BC1000")

vzhangti_2-1678944798114.png

Result:

vzhangti_3-1678944827176.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

3 REPLIES 3
v-zhangti
Community Support
Community Support

Hi, @VagelisVlachos 

 

You can try the following methods.
Sample data:

vzhangti_0-1678944719001.png

Date Table:

vzhangti_1-1678944745937.png

Measure:

WeeksBeforeCurrentYear = 
VAR SelectedYear = SELECTEDVALUE('Date'[Year])
RETURN
IF(YEAR(TODAY()) >  SelectedYear, "#D6D600", "#BC1000")

vzhangti_2-1678944798114.png

Result:

vzhangti_3-1678944827176.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

 

VagelisVlachos
Frequent Visitor

2023-03-14.png

use this dax and put the measure into default color as field value.
Week/Months Be4 Currt yr =
VAR S_Year = SELECTEDVALUE('calender'[Date])
return
IF(YEAR(TODAY()) >  S_Year, "#B3EE11", "#BC1000")

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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