Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |