Forum Discussion
Paginated reports - colour code highest value in table
Hi Anonymous ,
Please try:
=IIF(Fields!BSCorig.Value = MAX(Fields!BSCorig.Value, "YourTableName"), "Red", "Black")
I've made a test for your reference:
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!!
- Anonymous1 year agoNot applicable
Hi Anonymous ,
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