Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all,
I am trying to conditional format the color of my x-axis labels and data labels. My target is only show an axis label and data label for the min and max selected date (there is a date slicer)
I thought about creating a measure that will color the min and max date to black and all other selected dates to white
My date table has a column for the date (date format) which is filtered by the user, and a column for the month-year combination (text format)
I use the month-year column in my x-axis label and some measure for the y-axis
the measure I wrote is:
I don't use my date column in the graph because the measure doesn't work with date hierarchy and because I want to show a short month-year format in a uinque way
Help will be appreciated
@MichaelStrauss , Try a measure like
Measure =
var _max = maxx(allselected(Date),Date[Date])
var _min = minx(allselected(Date),Date[Date])
return
if(Max(Date[Date]) = _max || Min(Date[Date]) =_min, "#000000","#FFFFFF")
Hi @amitchandak
Thank you for your answer. Unfortunately the measure does not work, all labels returned black (#000000)
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
26 |
User | Count |
---|---|
95 | |
50 | |
43 | |
40 | |
35 |