Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello!
I want to color everything that is before Q1 2024 in green (instead of blue):
I tried to use the following measure:
Solved! Go to Solution.
Hi @Anonymous
I understand your problem:
What you need is to set all values before a certain date to green, then set the color of values that have a status of ‘Complete’(The return value is 2) after the date to green, and the others to blue.
I create a set of sample date:
Then create a measure:
color = IF(
MONTH(MAX('Table'[date]))<3
&&
YEAR(MAX('Table'[date]))=2023,
"green",
//Highlight data prior to March 2023 in green
IF(
MAX('Table'[status])=2,
"green",
"blue"
)
//Data with a status of 2 after March is marked in green, and others are in blue
)
Create a matrix and right-click the values and click the Conditional formatting > Background color
Field style > (What field should we base this on?)color
The result is as follow:
Best Regards,
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
I understand your problem:
What you need is to set all values before a certain date to green, then set the color of values that have a status of ‘Complete’(The return value is 2) after the date to green, and the others to blue.
I create a set of sample date:
Then create a measure:
color = IF(
MONTH(MAX('Table'[date]))<3
&&
YEAR(MAX('Table'[date]))=2023,
"green",
//Highlight data prior to March 2023 in green
IF(
MAX('Table'[status])=2,
"green",
"blue"
)
//Data with a status of 2 after March is marked in green, and others are in blue
)
Create a matrix and right-click the values and click the Conditional formatting > Background color
Field style > (What field should we base this on?)color
The result is as follow:
Best Regards,
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 35 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 136 | |
| 96 | |
| 77 | |
| 67 | |
| 65 |