+ Reply to Thread
Results 1 to 6 of 6

Power pivot can't calculate average because of text in column

  1. #1
    Registered User
    Join Date
    04-19-2021
    Location
    utrecht, netherlands
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    10

    Power pivot can't calculate average because of text in column

    Hey everybody,

    I am using power pivot to create an analysis sheet of some sort. The data I am using are the weights of injection moulded products in our factory. I used a combined slicer to be able to sort both product weight and shot weight on product ID. The slicer seems to work fine.
    The problem I have is that the power pivot can not calculate the average of the shotweights under products. The column for shotweights contains numbers and text. The reason for having text in the column is because it means the actual measurement is not complete and can not be used in calculating shot weights. A normal pivot table does not have this problem and just does not include the text rows for calculating the average. Any help on how to get a correct average calculation in the power pivot would be appreciated.

    The excel sheet is added to this thread.
    Attached Files Attached Files
    Last edited by beastiaan; 04-20-2021 at 08:23 AM.

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,908

    Re: Power pivot can't calculate average because of text in column

    I'd add a calculated column in your data model that returns the number or 0/BLANK depending on how you want the text treated - e.g.:

    =IFERROR([ShotWeight [g]]*100]+0,blank())
    Rory

  3. #3
    Registered User
    Join Date
    04-19-2021
    Location
    utrecht, netherlands
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    10

    Re: Power pivot can't calculate average because of text in column

    How can I return an actual blank out of a formula? If I let the function return a 0 when the measurement is incomplete it will count the 0 in the power pivot average. So the return of a 0 won't work. If I let the formula return a blank by using "", the power pivot also can't calculate the average because it sees the blank as text.
    I basically want the power pivot to calculate average of shotweight per product ID. It has to exclude the rows under (shotweight [g]*100) which have the text value INCOMPLEET in them.

  4. #4
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,908

    Re: Power pivot can't calculate average because of text in column

    I showed you how in my last post.

  5. #5
    Registered User
    Join Date
    04-19-2021
    Location
    utrecht, netherlands
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    10

    Re: Power pivot can't calculate average because of text in column

    Yes it worked! I tried editing the data in the normal excel sheet, I didn't do it in the data model. Working with power pivot is new to me. Not sure how it works, but it did. Thanks!

  6. #6
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,908

    Re: Power pivot can't calculate average because of text in column

    PP has a very useful BLANK() function (which I really wish they'd add to Excel) which is ignored in calculations.

+ 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. [SOLVED] Power Query/Power Pivot Conditional Column creation & chart
    By mz_h in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-12-2020, 06:07 PM
  2. [SOLVED] Power Pivot does not load new column added in Power query
    By ibuhary in forum Excel General
    Replies: 12
    Last Post: 02-19-2019, 03:53 AM
  3. Sub-Forum for Excel Power Tools (Power Query, Power Pivot & Power BI)
    By chullan88 in forum Suggestions for Improvement
    Replies: 10
    Last Post: 06-28-2018, 02:25 PM
  4. Replies: 15
    Last Post: 03-29-2018, 11:29 AM
  5. Replies: 7
    Last Post: 04-07-2017, 08:45 AM
  6. How to calculate Difference (%) in Power Pivot
    By Pony08 in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 06-05-2015, 06:54 PM
  7. Replies: 2
    Last Post: 04-12-2015, 05:36 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