+ Reply to Thread
Results 1 to 6 of 6

Special column in pivot table - defect per unit calc

  1. #1
    Registered User
    Join Date
    06-20-2013
    Location
    Bratislava
    MS-Off Ver
    MS EXCEL 2021
    Posts
    90

    Special column in pivot table - defect per unit calc

    Hi there.

    I try to solve very hard issue (maybe hard only for me)

    I try to dynamically calculate (in pivot table) parameter which i called defect per unit.

    Lets imagine we have column A with various type of defects, column B with vehicle number..

    If i would like to calculate defect per unit, it should be : count of all defect1 / all checked cars... in my case divide by 3 every time. And here is the issue.

    Anyhow i add pivot to data model - anyhow i create special distinguis calc of vehicles (means unique), anyhow i add new measure in new column, i can only divide count of defect with related cars... But not all cars count as i need :-/

    Please could you help me ?

    Here are pictures and excel attached :

    Screenshot_2023-03-28 15.36.45_thz9qu.png

    Screenshot_2023-03-28 15.37.38_mpOWi2.png
    Attached Files Attached Files
    Last edited by xbr088; 03-28-2023 at 09:58 AM.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,263

    Re: Special column in pivot table - defect per unit calc

    Change the measure to:

    =[Počet PROBLEM]/CALCULATE([Počet rôznych položiek v stĺpci VEHICLE],ALL('Tabuľka1'))
    Remember what the dormouse said
    Feed your head

  3. #3
    Registered User
    Join Date
    06-20-2013
    Location
    Bratislava
    MS-Off Ver
    MS EXCEL 2021
    Posts
    90

    Re: Special column in pivot table - defect per unit calc

    My gosh ! It works ! i spent 4 hours for many tryouts, and you reply me in couple of minutes with functional solution.

    Great, many thanks

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,263

    Re: Special column in pivot table - defect per unit calc

    Glad we could help.

  5. #5
    Registered User
    Join Date
    06-20-2013
    Location
    Bratislava
    MS-Off Ver
    MS EXCEL 2021
    Posts
    90

    Re: Special column in pivot table - defect per unit calc

    Quote Originally Posted by rorya View Post
    Glad we could help.
    Only one additional question.

    Is it possible to do also with pivot table which is not added to data model option ?

    Because there is also option to add calculated field or item, but there is little different dialog box for some calculation

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,263

    Re: Special column in pivot table - defect per unit calc

    The calculations in calculated fields in a normal pivot table always sum the fields involved, and there is no distinct count option available, so you would have to do most of the work in the source data, or in Power Query for example, and then build your pivot table.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Show per unit in pivot table
    By jkj115 in forum Excel Charting & Pivots
    Replies: 15
    Last Post: 02-06-2018, 11:31 PM
  2. Replies: 1
    Last Post: 03-08-2014, 02:02 AM
  3. Replies: 2
    Last Post: 10-24-2013, 08:45 AM
  4. How to calc thousands of estimates using pivot table
    By GradStudent2012 in forum Excel General
    Replies: 10
    Last Post: 08-08-2011, 04:26 PM
  5. Calc on Pivot Table
    By Frick in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-10-2006, 06:15 AM
  6. [SOLVED] Pivot table to calc by group
    By xlcharlie in forum Excel General
    Replies: 0
    Last Post: 01-24-2006, 06:45 PM
  7. Pivot Table - Calc Item Problem
    By Scott in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-06-2005, 03:05 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1