cancel
Showing results for 
Search instead for 
Did you mean: 

Conditional format in Crosstab based on Grand Total

Former Member
0 Kudos

I have a crosstab showing the grand total (average) for the rows, at the right end of each row.

How can I create a format field formula to compare the cell value (average) in that row to the grand total, and if it that cell is "greater" than the grand total, highlight that cell in yellow?

Thanks for any help.

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Cheryl,

Would you be able to send the report with saved data please?

-Abhilash

Answers (3)

Answers (3)

Former Member
0 Kudos

Abhilash fixed my formula, so it works correctly now:

If Int (Truncate(CurrentFieldValue/60)) + Int (Remainder (CurrentFieldValue, 60)) > Int (Truncate (GetTotalValueFor ("your field")/60)) + Int (Remainder (GetTotalValueFor ("your field"),60)) then crYellow else crNoColor

Thanks Abhilash!

Also thanks to everyone else for their helpful input.

former_member424792
Participant
0 Kudos

Try this, you will have to enter your Field name but it should work:

If CurrentColumnIndex > GetTotalValueFor ('Field you have in the crosstab') then CrYellow

Else NoColor

Where you enter your field you have to remove the { } and but ' ' at the beginning and end.

abhilash_kumar
Active Contributor
0 Kudos

I would change that a little to:

If GridValueAt(CurrentRowIndex, CurrentColumnIndex, CurrentSummaryIndex) > GetTotalValueFor ('Field you have in the crosstab') then CrYellow

Else NoColor

-Abhilash

former_member424792
Participant
0 Kudos

Why add what you added? I am asking for my own knowledge, to see if I need to change any of my reports that I use GridValue.

Thank you Abhilash

abhilash_kumar
Active Contributor
0 Kudos

CurrentColumnIndex will only get you the index (column index) of that 'cell'.

The GridValueAt function will give you the value at a particular cell.

-Abhilash

Former Member
0 Kudos