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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
MichaelaMul
Helper III
Helper III

Conditionally Format X-Axis

Hi,

 

I would like to change the color of the Rakuten to red on the X-Axis- is there a way to do this? I added the following rule but it doesn't seem to work. 

Thank you!

MichaelaMul_0-1741150128734.pngMichaelaMul_1-1741150170506.png

 

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hi @MichaelaMul 

Unfortunately the conditional formatting for the X-axis is computed once for the entire axis, not for each individual label on the X-axis. The axis labels must all be formatted the same colour.

 

If you examine the DAX query generated by the visual using Performance Analyzer, you will see a portion of the query similar to below that returns the minimum (i.e. "first") Brand in order to determine the axis text colour:

 

EVALUATE
    ROW(
        "MinBrand", CALCULATE ( MIN ( YourTable[Brand] ) )
    )

 

This is evaluated at the visual level, and the formatting condition would only be true when only the single Brand "Rakuten" is visible in the overall context of the visual.

 

There could be custom visuals out there that can do this, and I imagine it's possible to do this with Deneb if you want to explore that.

 

Regards


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

View solution in original post

5 REPLIES 5
v-kpoloju-msft
Community Support
Community Support

Hi @MichaelaMul,

May i know has your issue been resolved? If the response provided by the @OwenAuger, and @Akash_Varuna, addressed your query, could you please confirm? It helps us ensure that the solutions provided are effective and beneficial for everyone.

If yes, kindly accept the useful reply as a solution and give us Kudos. It would be appreciated.

Thank you for your understanding!

Hi @MichaelaMul,


I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.


Thank you.

Hi @MichaelaMul,


I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.


Thank you.

OwenAuger
Super User
Super User

Hi @MichaelaMul 

Unfortunately the conditional formatting for the X-axis is computed once for the entire axis, not for each individual label on the X-axis. The axis labels must all be formatted the same colour.

 

If you examine the DAX query generated by the visual using Performance Analyzer, you will see a portion of the query similar to below that returns the minimum (i.e. "first") Brand in order to determine the axis text colour:

 

EVALUATE
    ROW(
        "MinBrand", CALCULATE ( MIN ( YourTable[Brand] ) )
    )

 

This is evaluated at the visual level, and the formatting condition would only be true when only the single Brand "Rakuten" is visible in the overall context of the visual.

 

There could be custom visuals out there that can do this, and I imagine it's possible to do this with Deneb if you want to explore that.

 

Regards


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn
Akash_Varuna
Super User
Super User

Hi @MichaelaMul Could you try these please

  1. Create a New Column for Conditional Formatting:

 

X_Axis_Color = 
IF(
    [X_Axis_Field] = "Rakuten", 
    "Red", 
    "DefaultColor" 
)

​

 

              This column will assign "Red" to "Rakuten" and a default color to all other values.

  1. Apply Conditional Formatting:
  • Go to the Formatting pane of your chart.
  • Navigate to Data colors or X-axis formatting.
  • Select Conditional Formatting and set it to use the newly created column.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors