+ Reply to Thread
Results 1 to 4 of 4

PowerPivot: Merge Month Field and Year Field Into a Date Field

  1. #1
    Forum Contributor
    Join Date
    01-04-2013
    Location
    Tampa, Florida
    MS-Off Ver
    Excel 2013
    Posts
    142

    PowerPivot: Merge Month Field and Year Field Into a Date Field

    Hello all,

    I have a table in PowerPivot that is linked to a table from an Access database. I have a [ReportingMonth] field in MMMM format and a [ReportingYear] field in YYYY format. I'm looking for a way to combine the two fields into a [ReportingDate] field in MM/DD/YYYY format so that I can create a relationship with my Date Table. All of my reporting is by month, quarter and year so the day doesn't really matter. As I was trying to work this out myself I started with a simple =Month([Reporting Month]) formula, but I get an error stating, "Calculation error...:Cannot convert value 'September' of type Text to type Date. However, the data type for the calculated column is currently set as Auto (Whole Number).

    Does anyone have a solve for this?

    Thanks in advance.

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019
    Posts
    3,787

    Re: PowerPivot: Merge Month Field and Year Field Into a Date Field

    Sounds like a Formatting issue.. Something like Dates being entered as Text
    Cheers!
    Deep Dave

    www.NeedForExcel.com

  3. #3
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: PowerPivot: Merge Month Field and Year Field Into a Date Field

    "September" is text, not a date, so you can't use Month on it. To get a true date you can use DATEVALUE:
    =DATEVALUE("01-"&[ReportingMonth]&"-"&[ReportingYear])
    Remember what the dormouse said
    Feed your head

  4. #4
    Forum Contributor
    Join Date
    01-04-2013
    Location
    Tampa, Florida
    MS-Off Ver
    Excel 2013
    Posts
    142

    Re: PowerPivot: Merge Month Field and Year Field Into a Date Field

    Thanks romperstomper, that formula worked. I had tried that formula earlier but put it in month/day/year order and got an error. I didn't realize it had to be in day/month/year order. I appreciate your help.

+ 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. Invalid merge field message although I am using right field names in word document
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-17-2015, 07:59 AM
  2. [SOLVED] VBA to Pivot by Month and Cumulative Year to Date, then include variance field
    By mike_vr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-30-2013, 06:00 AM
  3. Replies: 0
    Last Post: 06-26-2012, 09:06 PM
  4. Replies: 3
    Last Post: 03-03-2012, 12:16 PM
  5. [SOLVED] Converting a date field into a month-year only field
    By C.Hirsch in forum Excel General
    Replies: 1
    Last Post: 04-24-2006, 07:15 PM
  6. [SOLVED] Merge an alpha field and a numeric field
    By grams in forum Excel General
    Replies: 3
    Last Post: 08-29-2005, 07:05 PM
  7. Month/Year Field Help
    By tamato43 in forum Excel General
    Replies: 4
    Last Post: 05-25-2005, 07:27 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