Results 1 to 2 of 2

Thread: Calculation after pivot table render

  1. #1
    Sencha Premium Member
    Join Date
    Sep 2013
    Location
    India
    Posts
    57

    Default Calculation after pivot table render

    Hello,

    I have following Data
    Category Std Hours Actual Hours
    Category 1 10 9
    Category 1 20 21
    Category 2 10 3
    Category 1 4 6
    Category 2 7 7

    When I show the same data in pivot table using "Category" in Row Labels and "Std Hours" and "Actual Hours" in Values (sum). I get following output

    Category Std Hours Actual Hours
    Category 1 34 36
    Category 2 17 10

    I want one more field in Values say "efficiency" which would be "Std Hours"/"Actual Hours". But this would be calculated on aggregate sum function

    ategory Std Hours Actual Hours Efficiency
    Category 1 34 36 94.44%
    Category 2 17 10 170%

    Can anybody help for the same

    Thanks & Regards,
    Pranav C Lunavat

  2. #2
    Sencha Premium User
    Join Date
    Dec 2009
    Location
    Iasi, Romania
    Posts
    159
    Answers
    9

    Default

    Quote Originally Posted by plunavat View Post
    Hello,

    I have following Data
    Category Std Hours Actual Hours
    Category 1 10 9
    Category 1 20 21
    Category 2 10 3
    Category 1 4 6
    Category 2 7 7

    When I show the same data in pivot table using "Category" in Row Labels and "Std Hours" and "Actual Hours" in Values (sum). I get following output

    Category Std Hours Actual Hours
    Category 1 34 36
    Category 2 17 10

    I want one more field in Values say "efficiency" which would be "Std Hours"/"Actual Hours". But this would be calculated on aggregate sum function

    ategory Std Hours Actual Hours Efficiency
    Category 1 34 36 94.44%
    Category 2 17 10 170%

    Can anybody help for the same

    Thanks & Regards,
    Pranav C Lunavat
    Take a look at how this aggregator function is implemented and do your own for the third aggregate dimension. Provide IDs to the aggregate dimensions because those will be available in the result object.

Similar Threads

  1. How to create table format with calculation using ExtJs 2.3
    By arunmatics in forum Ext Designer: Help & Discussion
    Replies: 0
    Last Post: 8 Jan 2014, 5:33 PM
  2. Pivot table
    By simon in forum Ext: Q&A
    Replies: 2
    Last Post: 28 Feb 2013, 6:08 AM
  3. Replies: 0
    Last Post: 18 May 2011, 8:26 PM
  4. Table column width calculation issue moving from 2.2 to 3.2.1
    By harperml in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 30 Jun 2010, 8:12 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •