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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Expression Error For Background Color in Paginated Report

I am creating a Accounts Receivable paginated report in report builder based off a Power BI Dataset from an already created Power BI Report. 

I have a column called "Due_Date" that I need to conditionally format. Need to know the due date that are late, so basically any date that is less than today. Below is my code and the error message. Any suggestions please?

 

My code: 

=IIf(Fields!Due_Date.Value < Today(), "Red"))

 

The Error:

The 'BackgroundColor' expression for the text box 'Due_Date' contains an error: [BC30516] Overload resolution failed because no accessible 'IIf' accepts this number of arguments.
----------------------------
The definition of the report '' is invalid.
----------------------------
An error occurred during local report processing.

3 REPLIES 3
GilbertQ
Super User
Super User

Hi @Anonymous 

 

Could you try the following

 

=IIf(Fields!Due_Date.Value < Now(), "Red"))




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Anonymous
Not applicable

It did not work. Error message:

 

The 'Color' expression for the textrun 'Due_Date.Paragraphs[0].TextRuns[0]' contains an error: [BC30516] Overload resolution failed because no accessible 'IIf' accepts this number of arguments.
----------------------------
The definition of the report '' is invalid.
----------------------------
An error occurred during local report processing.

Hi @Anonymous 


Could you make sure that both the Fields!Due_Date.Value and now() are both returning a date value?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

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.