KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Color code data cell values in Pivot table and remove aggregates names from top #1005

Open Rajesh opened this topic on on Jul 23, 2019 - 3 comments

Rajesh commented on Jul 23, 2019

Hi Koolreport,

Below pivot table is built using koolreport and I would like to implement below three things into it.

1) Is it possible to color code the data cell values based on condition? I was able to achieve it in your table package but having difficulty in implementing with Pivot table.

For example, in below image for "7day Avg" Revenue column, show the data cell values in red color when "Prev Day" Revenue column value is lesser than "7day Avg" revenue. Likewise, show the values in green color when "Prev Day" Revenue column value is greater than "7day Avg" revenue.

2) Can we remove the below highlighted green color text (aggregates names) and total from the pivot table?

3) Also, is it possible to show the dimensions names in the pivot table?

In below image "CPA - A", "CPA-O" and "Dir" values are coming from column "Business Line". I want to show the header as Business Line for this values. Also, when drilled down I want to show all the respective drilled down dimensions names.

Please let me know.

Rajesh commented on Jul 26, 2019

Hi Koolreport,

Could you please respond to my question?

Thanks,

Rajesh.

Rajesh commented on Aug 7, 2019

Hi Koolreport,

Could you please let me know?

Thanks,

Rajesh.

David Winterburn commented on Aug 9, 2019

Hi Rajesh,

Sorry for the late reply! Regarding your questions:

  1. This is a bit hard as a pivot table's data structure is very different from a normal table. We will try to find a solution for you.

  2. Please inspect the element you want to hide with F12 in Chrome, Firefox and add a CSS rule display:none for those elements.

  3. There's a way to add a dimension name to a row or column header. Please try this map property in PivotTable:

PivotTable::create(array(
    ...
    'map' => array(
        ...
        'rowHeader' => function($rowHeader, $headerInfo) {
            return  $headerInfo['fieldName'] . ". " . $rowHeader;
        },

Let us know if we understand your questions correctly. Thanks!

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed

Pivot