CSS color format for particular column data dynamically in PIvot

HI Team, My requirement is, I am getting data two columns from database in that one is value another is color So i want show the value according to color by compare two column.

I find peace of code to add CSS color to row data in PIVOT table.

columns[i].cssFormat = function(value){ var css = “”; if(value > 0) css = { “color”:“red” }; else if(value >0 ) css = { “color”:“green” }; return css; };

Here , I am able to get colors to value But i want validate color as per what i get from another column. Please let us know how to add color to that value.

And please let me know how to find maximum row number in pivot as per selection row fields.

let me explain my requirement better,

we have created pivot table with different fields like time period, region, country,wallet,some of wallet etc… we can drag fields in to ROW,Column and values boxes am getting data dynamically as per selection …

Now my requirement is, while select two time period(FY11 and FY12) and sow filed in to pivot (we have more then this two selection in row and column and values field as per selection other filed the time period and sow data place will be change and update) , now am get sow data in two column in below to FY11 and FY12. i need to compare both SOW values from both time period based on increase and decrees (else we get increment(Green) and decrements(RED) values from database also by compare) we need to show color for SOW values on only FY12 data column only, not for FY11.

Here we are not sure how many times repeat sow column for two time period(based on selection we get FY12,FY11 and SOW repeat with different values)

They have chance to get time period (FY11,FY12) as row data and sow in column also.

So, Simply we need to show color for sow values for FY12 (column or row) at any place , while have FY11 and FY12 both .

Note::

Based on above given code i handle and i will able show color for all(FY11 and FY12) sow values while multiple time period drag only .

Now we need to show color only for FY12 sow data only .

And All data dynamic include time period also we get any time period like FY11, FY15 etc…we need to compare show sow color to bigger time period.

And pivot values also getting into list while scroll page…not getting all values at a time.

Please do need full.

Thank you

HI Team,
Can you please update on this.
Thank you