Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello,
I have 2 seperate bar charts with "Months", "Years" (2018-2021), and "Passengers Total". Similarly, the second bar chart has "Months", "Years" (2018-2021), and "Flights Total". I am trying to highlight the busiest months for each year (2018-2021) for "Passengers Total" and Flights Total" using a specific color (red). I have tried changing the colors by using every option available (Gradient, Rules, Field Value) and none of them work or even apply to my particulat data because each year has a different Max value so I can't say if Passengers Totals is <= to 75K then make the color red because it would apply it to all the years and some years the max value is 72K, some 66K, etc. Also, it won't even let me select the word "Max" it wants me to enter a numerical value. I've tried to create a seperate table laying out the Max months and their values per each year and plotting it that way but that doesn't work properly. Below is my current bar charts for both "Passengers Totals" and Flights Totals" and the new tables for each with the max month values per year.
Solved! Go to Solution.
@laser_beam , First of all you can not apply conditional formatting when you use measure. So what you need to do is take both Year and month on axis. then You need expand them as use concatenate label off and sort on axis(year - month), repeat steps if you do not get below
Post that create a measure . Assuming flight is the measure and you are using
Then create a color measure
Color =
var _max = calculate(maxx(Values('Date'[Month Year]), [flight ]), filter(allselected('Date') , 'Date'[Year] =max('Date'[Year]) ))
return
Switch(True() ,
[flght] =_max , "Red",
"Green"
)
Use in conditional formatting using field value option
How to do conditional formatting by measure and apply it on pie?: https://youtu.be/RqBb5eBf_I4
@laser_beam , First of all you can not apply conditional formatting when you use measure. So what you need to do is take both Year and month on axis. then You need expand them as use concatenate label off and sort on axis(year - month), repeat steps if you do not get below
Post that create a measure . Assuming flight is the measure and you are using
Then create a color measure
Color =
var _max = calculate(maxx(Values('Date'[Month Year]), [flight ]), filter(allselected('Date') , 'Date'[Year] =max('Date'[Year]) ))
return
Switch(True() ,
[flght] =_max , "Red",
"Green"
)
Use in conditional formatting using field value option
How to do conditional formatting by measure and apply it on pie?: https://youtu.be/RqBb5eBf_I4