+ Reply to Thread
Results 1 to 3 of 3

Pivot calculated field vs Datamodel measure

  1. #1
    Forum Contributor
    Join Date
    10-14-2020
    Location
    Shanghai
    MS-Off Ver
    O365
    Posts
    156

    Pivot calculated field vs Datamodel measure

    Hi

    I do have a pivot table where I want to calculate the scrap percentage for each row vs the total output. I thought by creating a calculated field I can achive my target but its not working.

    Using a Powerpivot and create the measure is fine.
    HTML Code: 
    This gives me the total value of the selection for my output column. This can be used to calculate the percentage of each row.

    Question is, how can I get the same result with a calculated field or other ways without using the datamodel?

    Thanks
    Attached Files Attached Files
    Last edited by hansolu; 11-16-2021 at 11:16 PM. Reason: solved

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Pivot calculated field vs Datamodel measure

    Hi,

    Calculated Field formulas cannot refer to the Pivot Table totals or subtotals. So if you don't want to use the data model you'd have to add the required total to every row within the source data table, then reference that within the Pivot Table, using e.g. MAX as the aggregation to ensure it is repeated identically for each row within the Pivot Table.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Forum Contributor
    Join Date
    10-14-2020
    Location
    Shanghai
    MS-Off Ver
    O365
    Posts
    156

    Re: Pivot calculated field vs Datamodel measure

    Hi

    okay, I thougth so. The issue with pulling the sum in a column is that this is not flexibel if I change the period of view or combine different areas or partnumber in my real data.
    So I need to change to Datamodel to get my desired behaviour.

    thank

+ 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. Sort filtered and summarized table in Measure (Datamodel)
    By hansolu in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 09-30-2021, 10:00 PM
  2. [SOLVED] Averagex measure in datamodel
    By hansolu in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 09-13-2021, 01:12 AM
  3. Calculated measure in Pivot Table
    By fher97 in forum Excel Charting & Pivots
    Replies: 12
    Last Post: 06-15-2021, 12:58 PM
  4. Replies: 1
    Last Post: 01-15-2019, 08:54 PM
  5. Replies: 0
    Last Post: 08-15-2016, 02:07 PM
  6. Powerpivot Calculated Measure to remove blanks from pivot table/chart
    By hbusche in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 07-17-2013, 01:23 PM
  7. Replies: 0
    Last Post: 06-26-2012, 09:06 PM

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