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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Resolver IV
Resolver IV

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. 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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