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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
AliPoTD
Advocate II
Advocate II

Paginated reports - colour code highest value in table

Hello all,

 

Please can I ask for help with Paginated Reports?

 

I have been tasked with creating an invoice which includes the ability to colour code the highest value in a column to be a different colour to make it stand out. This varies per client.

 

I am using a List to loop the data per client, and I have a Table Tablix within this List showing the information as shows:

AliPoTD_0-1727448536911.png

In the column BSC (orig) I need to change the font colour (e.g. to red) of the value 14 as this is the highest value for this column.

Presumably I need to add a formula in the below image, but have no idea what I should write. Can anyone help please?

AliPoTD_1-1727448664025.png

Many thanks.

3 REPLIES 3
Anonymous
Not applicable

Hi @AliPoTD ,

 

Please try:

=IIF(Fields!BSCorig.Value = MAX(Fields!BSCorig.Value, "YourTableName"), "Red", "Black")

I've made a test for your reference:

 

vbofengmsft_0-1727662531649.png

vbofengmsft_1-1727662549222.png

vbofengmsft_2-1727662561566.png

vbofengmsft_3-1727662576737.png

 

Best Regards,

Bof

 

 

Thank you so much for your response.

I have tried your suggestion which at first hasn't worked but I can understand your logic. 

I have entered:

=IIF(Fields!BSC_Original.Value = MAX(Fields!BSC_Original.Value, "BaseData"), "Red", "DarkGray")

but this resulted in all the values in the column being Dark Grey and not red - but I believe this is due to the command stating show red for the highest value in the entire table BaseData, is this correct?

I think I need to tweak the data so that it shows the highest value as red for the Filtered data (using the parameters i have set up)

I have 2 parameters - one is Date and the other is the Farm Number. The resulting data shown in the table in my first post shows the data from Basedata table which has been filtered by Date and Farm Number.

I guess I need to filter the expression to do e.g. 

=IIF(Fields!BSC_Original.Value = MAX(Fields!BSC_Original.Value, "BaseData" (where date = ParameterDate & Farm Number = ParameterFarmNumber), "Red", "DarkGray").

 

Is this correct and if yes, please can you share the syntax? Many thanks in advance.

 

Also, I've only ever used "IF", I've not seen "IIF" before, please can you clarify the difference.

 

Many thanks. I'm learning loads!!

Anonymous
Not applicable

Hi @AliPoTD ,

 

The MAX function calculates within the current context of the report, so as long as the filters in the report are applied, MAX will return the correct results based on those filtering conditions.

 

Best Regarrds,

Bof

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors