Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I want to create a conditional color formatting for the following column:
Essentially, I want every cell thats date is in the past to have a red background color and every cell that is present or today to have a green background color. I explored the web a bit to figure this out but I am a beginner with power BI and creating a measure was difficult. I ran into a "does not recognize latest start date" notification for the measure I tried to create. This confused me because clearly I have that column in my chart. Anyways, if anyone out there could help walk me through this you would be a life saver.
Solved! Go to Solution.
Hi @masonsmerl17 ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want.
1. Create a measure as below
Conditional formatting =
VAR _selsdate =
SELECTEDVALUE ( 'Table'[Latest Start Date] )
RETURN
SWITCH (
TRUE (),
_selsdate < TODAY (), "Red",
DATE ( YEAR ( _selsdate ), MONTH ( _selsdate ), DAY ( _selsdate ) ) = TODAY (), "Green"
)
2. Configure conditional formatting
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi @masonsmerl17 ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want.
1. Create a measure as below
Conditional formatting =
VAR _selsdate =
SELECTEDVALUE ( 'Table'[Latest Start Date] )
RETURN
SWITCH (
TRUE (),
_selsdate < TODAY (), "Red",
DATE ( YEAR ( _selsdate ), MONTH ( _selsdate ), DAY ( _selsdate ) ) = TODAY (), "Green"
)
2. Configure conditional formatting
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hello,
You can create a column
it will give you list of options, select conditional formatting and then select background color,
and then Format by - Rules
Based on field - select column that you have created just now
and then you can add rules here
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
77 | |
74 | |
57 | |
40 | |
33 |
User | Count |
---|---|
70 | |
63 | |
57 | |
49 | |
46 |