This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
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
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 34 | |
| 29 | |
| 29 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 68 | |
| 45 | |
| 33 | |
| 24 | |
| 23 |