Hi,
I have this user requirement which I'm trying to cater for through a crosstab.
The format is as follows:
Facility1 Facility2 Facility3
Cat1 Cat 2 Cat 3 Ttl Cat1 Cat 2 Cat 3 Ttl Cat1 Cat 2 Cat 3 Ttl
Project1 5 4 0 9 1 2 3 6 5 0 5 10
Project2 0 0 0 0
For each Ttl cell, the background colour is to be coloured according to this condition:
If Cat1 value is highest, colour is Green, else if Cat3 value is highest, colour is Red, , if Ttl is 0 or NULL then no colour is applied, for all other conditions, ie default, colour is Yellow.
Research shows that GridRowColumnValue and CurrentFieldValue can be used to colour a cell according to a condition, usually with the specific cell's value, but not if the outcome is dependent on other cells.
I have tried an alternative suggested by a co-worker:
- sort the data by Facility, Project, Cat and add a counter variable to the details, with the condition to increment 1 of 3 variables depending on which category the record fits into and then comparing the value of these 3 variables to set a fourth var
- this fourth var is used in the background formatting fomula for the ttl cells.
This solution is not quite working as all the total cells are displaying the same colour even though at record level, the variables are behaving as expected.
I have a feeling I'm still missing something about crosstabs behaviour. Now I am not sure what else I can try. Any help at all would be much appreciated! (I am a biz analyst who's not so savvy with the techy stuff, so please bear with me if I ask questions that may be simplistic or for which answers are usually obvious)
Thank you.
Edited by bcgoh - 16 Apr 2008 at 11:08pm