Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
I want Grey backgroung color where the matrix values are blank.
For that I wrote following measure but I am not getting desired output.
Can someone help!!
Solved! Go to Solution.
@Anonymous Actually matrix visual not consider blank value for conditional formating when we use Format by as field value . So we need to do one work around.
1. Update your Actual date column code with below code:-
Actual Hours =
VAR result =
IF ( WEEKDAY ( 'Employee Data'[Date], 2 ) <= 5, 'Employee Data'[Hours Worked] )
RETURN
IF ( result = BLANK (), 0, result )2. Update your conditional formatting code with below code:-
Conditional Formatting =
IF(
SELECTEDVALUE('Employee Data'[Date])=TODAY(),
"#E7F508",
IF(
SELECTEDVALUE('Employee Data'[Actual Hours])<4.5 && SELECTEDVALUE('Employee Data'[Actual Hours])>=4,
"#08BCF5",
IF(
SELECTEDVALUE('Employee Data'[Actual Hours]) = 0,
"#859CA4"
)
)
)You will see below output:-
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @Anonymous ,
Can you try below code:-
format =
IF (
MAX ( 'Employee Data'[Date] ) = TODAY (),
"Yellow",
IF (
MAX ( 'Employee Data'[Actual Hours] ) < 4.5
&& MAX ( 'Employee Data'[Actual Hours] ) >= 4,
"LightBlue",
IF ( MAX ( 'Employee Data'[Actual Hours] ) = BLANK (), "Grey" )
)
)
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
can you try below code:-
format =
VAR selected_date =
MAX ( 'Employee Data'[Date] )
RETURN
IF (
ISBLANK ( selected_date ),
"Grey",
IF (
selected_date = TODAY (),
"Yellow",
IF ( selected_date < 4.5 && selected_date >= 4, "LightBlue" )
)
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
This one is also not working!!
Is it possible for you to share PBIX file after removing confidential data?
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
@Anonymous Actually matrix visual not consider blank value for conditional formating when we use Format by as field value . So we need to do one work around.
1. Update your Actual date column code with below code:-
Actual Hours =
VAR result =
IF ( WEEKDAY ( 'Employee Data'[Date], 2 ) <= 5, 'Employee Data'[Hours Worked] )
RETURN
IF ( result = BLANK (), 0, result )2. Update your conditional formatting code with below code:-
Conditional Formatting =
IF(
SELECTEDVALUE('Employee Data'[Date])=TODAY(),
"#E7F508",
IF(
SELECTEDVALUE('Employee Data'[Actual Hours])<4.5 && SELECTEDVALUE('Employee Data'[Actual Hours])>=4,
"#08BCF5",
IF(
SELECTEDVALUE('Employee Data'[Actual Hours]) = 0,
"#859CA4"
)
)
)You will see below output:-
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 4 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 16 | |
| 8 | |
| 7 | |
| 6 | |
| 6 |