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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.