KoolReport's Forum

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

Pivot - Generating a new column based on a Pivoted Column #1050

Closed Donald Orban opened this topic on on Aug 19, 2019 - 1 comments

Donald Orban commented on Aug 19, 2019

I have two columns, Sum of Kids and Sum of Class Rooms, I would like to take the Sum of Classes/Sum of Kids and display as a new value for the year and quarter. From all the documentation I've read I can't seem to figure this out. I've tried making a calculated column but the values don't turn out properly.

Year # Kids # Classes 2018 236 128 54%

1	        	71	47			  	66%
    1         	26	15				
    2       	15	10			
    3       	30	22				
2	        	69	36			  	52%
    4       	40	21				
    5       	20	10				
    6       	9	5				

->pipe(new Pivot(array(

        'dimensions'=>array(
            'row'=>'year,case_dt, month',
        ),
        'aggregates'=>array(
            'count'=>'case_dt',
            'sum'=> 'kids, class,
        )
    )))
Donald Orban commented on Aug 19, 2019

I'm currently looking at, Ticket #905, I think the ->pipe(new \koolreport\processes\Map([, and Util, classes.

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
None yet

Pivot