Closed Thread
Results 1 to 12 of 12

Blank cells not working with Power Pivot?

  1. #1
    Registered User
    Join Date
    05-10-2016
    Location
    Bratislava
    MS-Off Ver
    2013
    Posts
    23

    Question Blank cells not working with Power Pivot?

    Hi dear forum,

    I am quite new to working with Power Pivot and have found it very beneficial. I have encountered one issue however:

    I have added a new Data Model to my Excel File in which I have some blank cells. For this data model, I'm creating groups of Pivot Charts. I've created about 100 charts already pretty quickly and had no issues whatsoever because I used only "Count" in the "Values" section.

    For one group of charts, the "Average" is needed. When it's selected, I get the error message:

    "We can't summarize this field with Average because it's not a supported calculation for Text data types."

    At first I was quite confused as I didn't know what was causing this. After playing around with the data a bit, I've found out that somehow Power Pivot is recognizing the blank cells I have in my Data range as a Text data type.

    I should also note that the blank cells are not actually blanks, there are formulas pasted in as following:

    =IF('Raw Data'!D3888="","",'Raw Data'!D3888)

    Is there any workaround for this?

    Please feel free to let me know if you need additional info.

    Best regards,
    Adam

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Blank cells not working with Power Pivot?

    Hi,

    Can you simply change that field type to Number?
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Registered User
    Join Date
    05-10-2016
    Location
    Bratislava
    MS-Off Ver
    2013
    Posts
    23

    Re: Blank cells not working with Power Pivot?

    Hey there,

    Thanks for your reply!

    it's already changed to Number, on the "empty" cells as well. I think that the Power Pivots have an issue with the formula that's in those "empty" cells. Cannot be sure though.

    What do you think?

    Cheers,
    Adam

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Blank cells not working with Power Pivot?

    If the field type in Power Pivot is number, there should be no reason why you cannot create an Average measure on that field. Did you refresh the data after changing the field type?

  5. #5
    Registered User
    Join Date
    05-10-2016
    Location
    Bratislava
    MS-Off Ver
    2013
    Posts
    23

    Re: Blank cells not working with Power Pivot?

    You mean the Data Type in the Power Pivot? Well, on there, it is set to Text. I've tried to change it to "Decimal Number" before but it returned the following error message:

    ============================
    Error Message:
    ============================

    The following system error occurred: Type mismatch.
    Datatype conversion failed for [Table: 'Table1', Column: 'TTR', Value: ''].


    I think Value: " are those empty cells, right?

    Thanks,
    Adam

  6. #6
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Blank cells not working with Power Pivot?

    I would imagine so, yes. It is interesting that the PP add-in for 2010 has no such problem.

    I take it that Raw Data is not a table in the model?

  7. #7
    Registered User
    Join Date
    05-10-2016
    Location
    Bratislava
    MS-Off Ver
    2013
    Posts
    23

    Re: Blank cells not working with Power Pivot?

    No, to explain a bit further:

    My file has one source - the Raw Data. That's unprocessed data extracted from a website. I then have the Processed Data sheet, where that raw data is either processed into more suitable formats or calculated to display a certain metric.

    I have added the Processed Data into the Power Pivot data model as it's processed and ready to be displayed in form of Pivot Charts and Pivot Tables - precisely what I need.

    The Processed Data tab is also the reason why I have so many empty cells. I have to create the function I mentioned above (=IF('Raw Data'!D3888="","",'Raw Data'!D3888)) because the Processed Data table doesn't expand automatically with new data entered into the Raw Data sheet.

    I think if I would use Raw Data as the data model this issue wouldn't happen as I firstly wouldn't have any blank cells because the table would expand automatically upon entering new data and secondly because even if there were blanks, they would be really blank with no formula in the background as it's of course the case with the column in the Processed Data. I think that's precisely why Power Pivot has an issue with that.

    Do you know any workaround?

    Many thanks,
    Adam

  8. #8
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Blank cells not working with Power Pivot?

    To be honest it is hard for me to so anything other than guess because I cannot recreate your problem. If you use NA() as the return value for blank cells instead of "", can you then make the field into a number field?

  9. #9
    Registered User
    Join Date
    05-10-2016
    Location
    Bratislava
    MS-Off Ver
    2013
    Posts
    23

    Re: Blank cells not working with Power Pivot?

    Npe, not possible either, same error message. Creating the chart with Raw Data works. I think I'll just create that group of Pivot Charts out of the Raw Data table. It will look ugly but I don't think there's another way

    But thanks a million for your help with this one!

  10. #10
    Registered User
    Join Date
    10-18-2012
    Location
    Surrey, BC
    MS-Off Ver
    Excel 2016
    Posts
    84

    Re: Blank cells not working with Power Pivot?

    Did you ever get a solution to your issue as I am having the same issue.
    If the formula returns a "", the data model table converts the column to text and won't allow me to change to a number.
    I know if I place a 0 instead of "", this works but I do not want 0's as it throws off my averaging.

    Are there any other numeric characters that can be used in place of "" that the data model table will like and any calculation will ignore? I have tried "-" but didn't work.

    Craig

  11. #11
    Registered User
    Join Date
    08-12-2013
    Location
    Amsterdam
    MS-Off Ver
    10
    Posts
    2

    Re: Blank cells not working with Power Pivot?

    Quote Originally Posted by CraigsWorld View Post
    Did you ever get a solution to your issue as I am having the same issue.
    If the formula returns a "", the data model table converts the column to text and won't allow me to change to a number.
    I know if I place a 0 instead of "", this works but I do not want 0's as it throws off my averaging.

    Are there any other numeric characters that can be used in place of "" that the data model table will like and any calculation will ignore? I have tried "-" but didn't work.

    Craig
    Did you ask this on /r/excel ? I was in the middle of answering it there.

  12. #12
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,860

    Re: Blank cells not working with Power Pivot?

    Administrative Note:


    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. error in power query & power pivot
    By Baldev Kumar in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 01-03-2018, 01:34 AM
  2. Power Pivot Help - SQL code working sort of?
    By lwilt in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-16-2016, 12:09 PM
  3. blank values in a power pivot
    By stephme55 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-11-2016, 05:34 AM
  4. Replies: 0
    Last Post: 12-04-2015, 11:31 AM
  5. Power Pivot rank cells if condition on column is met.
    By hyperlemon in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-18-2014, 04:39 AM
  6. Power pivot is not downloading, or working
    By AB33 in forum Excel General
    Replies: 0
    Last Post: 08-06-2012, 12:47 PM

Tags for this Thread

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