Hello there,
I'm aware of the conditional formatting coloring techniques found in the documentation (CellControlAttached handling), but I cannot seem to find a way to color a cell based on some other cell’s value.
For example, I have 2 measures in my pivot grid: Sale and Cost. I calculate the profit based on a simple formula: Profit = Sale-Cost (the Profit is not a measure, just an inner field).
My requirement is to modify the ‘Sale’ cell values of the grid by the following business rules:
- If the profit (Sale – Cost value) exceeds 25%+, highlight the Sale cell values with a green color
- If the profit is less, color the Sale cells with a blue color
My problem is that I cannot find a way to retrieve the ‘Cost cell value’ of a given ‘Sale cell value’. I could have scenarios where there's more dimensions in the pivot and also Date fields that drill down to month-view and expand them. In this cases, the Sale and Cost cells are not near each other and I need to find their related values: Sale and Cost in 2011/5.
Is there a way to achive this?
It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking into your post and I suggest you see these links:
http://help.infragistics.com/Help/Doc/WPFDV/2011.1/CLR4.0/html/xamPivotGrid_US_Conditional_Formating.html
and
http://samples.infragistics.com/sldv/RunSamples.aspx?cn=pivot-grid#/pivot-grid/conditional-formatting
where there are samples and explanations about the conditional formatting in XamPivotGrid.