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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Conditional Formatting in Paginated Reports

I want to conidtional format cells within a paginated report that highlights the cell "RED" if it has an associated ID that says YES, if no then leave as is.  For example within the picture belwo the two numbers under remaining in white boxes should be RED.  How can I write an expression within the box that allows this;  The current expression under reamining is  = Sum(Fields!Remaining.Value) and the current under ID is = Fields!ID_.Value.  How can I write an IF statement within the first encompassing this change???

 

JMcAnarney_0-1656777239004.png

 

3 REPLIES 3
v-rongtiep-msft
Community Support
Community Support

Hi @Anonymous ,

Please refer to the topic to see if it helps you.

Conditional Formatting of Fields in Paginated Reports 

=IIF(Me.Value="Ongoing Company Contact", "Green",IIF(Me.Value="On-Hold", "Red",IIF(Me.Value="In-Progress", "Yellow", "Black")))

 

More details: Conditional Formatting for SQL Server Reporting Services Reports 

  • In the formula window, we will put the following formula:     
=IIf(Fields!pctFree.Value<0.2,"Bold","Default")

We use the IIf function that returns 2 values depending on the evaluation of an expression. In this case, our expression is to evaluate if the free space of a drive is under 20%. If true, it will return “Bold”, if false, it will keep the “Default” value:

 

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

I understand the formula you provided; however, wouldn't that make the "yes" red?  What I want in this case is the number to be red based off what the column next to it says.  So how can I combine the number expression:  =Sum(Fields!Remaining.Value) with the color expression: =IIF(ID="Yes", "Red","Blue")?

v-rongtiep-msft
Community Support
Community Support

Hi @Anonymous ,

Please have a try.

=IIF(ID="Yes", "Red","Blue")

I have also found a blog about Conditional Formatting in Paginated Reports. Please refer to it.

Paginated Reports: Expressions, Conditional Formatting, and Subreports 

  • You can also add conditional formatting to the report. We’ll add conditional formatting to the ID_Sales_Growth detail row. To do this, right-click the ID_Sales_Growth detail row -> select Textbox Properties -> select Font. This brings up the font size and coloring options. Since we’re going to only conditionally format the font color only, select the fx icon next the Color.

  • The expression is set to Black by default. Let’s change it to =Iif(Fields!ID__Sales_Growth.Value< 0, “Red”, “Black”). The expression means that if the value of ID_Sales_Growth is less than zero, set the font color as red, otherwise, set the font color as black. Click OK and OK again.

 

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.