Reply
jam17
Helper I
Helper I

Change Date x-axis value colors by weekday() - NOT BARS, the axis itself

I have a table I'm using to track clicks per day, and I think it would be useful to have some indicator for which days were weekends.

I was thinking I might be able to do this by writing a measure with hex codes like this:

Measure = IF(OR(WEEKDAY(_____('Date Table'[Date]))=1,WEEKDAY(______('Date Table'[Date]))=7),"#C8C8C8","#223D64")
But I can't figure out what function to put in the ________.  

The ultimate goal would be to have weekdays in the x-axis labels to be blue and the weekends (e.g. Oct 19 and Oct 20) to be grey.
jam17_0-1731003985112.png
5 REPLIES 5
jam17
Helper I
Helper I

I tried both SELECTEDVALUE and MAX, but that resulted in everything being changed.

Also, I'm not looking to color the bars (as I'm never expecting there to be clicks on those days), but instead the dates themselves, as a quick indicator to my stakeholders that they shouldn't expect clicks on those days, because it's the weekend.

Thanks.  Upvoted.

wini_R
Solution Supplier
Solution Supplier

Hi @jam17,

Beside MIN/MAX aggregators mentioned by FreemanZ, it would also work with SELECTEDALUE()

wini_R_0-1731005352346.png

 

FreemanZ
Super User
Super User

hi @jam17 ,

  

try to fill it with MAX or MIN. 

avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)