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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
jalaomar
Helper IV
Helper IV

Conditional formatting in matrix table

Dear all,

 

I am creating a matrix table where I have a list of Projects and I would like to visualize the which tollgate each projects are in.

that information is based on the actual start date.

 

How can I create a conditional formatting so that the actual dates are a background color instead (don't want to show the value only the background color)?

 

2021-10-27_16-19-55.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @jalaomar ,

I created some data:

vyangliumsft_0-1635901762210.png

Put into the matrix:

vyangliumsft_1-1635901762213.png

Here are the steps you can follow:

1. Create measure.

Measure =
SWITCH(
    TRUE(),
    MAX('Table'[Date])>=DATE(2019,7,29)&&MAX('Table'[Date])<=DATE(2020,1,1),"red",
    MAX('Table'[Date])>=DATE(2020,1,2)&&MAX('Table'[Date])<=DATE(2020,6,23),"yellow",
    "green")

2. Format – Conditional formatting – select the Date field – open the Background color.

vyangliumsft_2-1635901762214.png

3. Enter the Background color interface, Format by – Field value, Based on field – [Measure].

vyangliumsft_3-1635901762215.png

4. Result:

vyangliumsft_4-1635901762216.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi  @jalaomar ,

I created some data:

vyangliumsft_0-1635901762210.png

Put into the matrix:

vyangliumsft_1-1635901762213.png

Here are the steps you can follow:

1. Create measure.

Measure =
SWITCH(
    TRUE(),
    MAX('Table'[Date])>=DATE(2019,7,29)&&MAX('Table'[Date])<=DATE(2020,1,1),"red",
    MAX('Table'[Date])>=DATE(2020,1,2)&&MAX('Table'[Date])<=DATE(2020,6,23),"yellow",
    "green")

2. Format – Conditional formatting – select the Date field – open the Background color.

vyangliumsft_2-1635901762214.png

3. Enter the Background color interface, Format by – Field value, Based on field – [Measure].

vyangliumsft_3-1635901762215.png

4. Result:

vyangliumsft_4-1635901762216.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

lbendlin
Super User
Super User

apply the same color rule to the background and to the value.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.