Search code examples
excelpivot-tablemicrostrategy

Excel Not Interpreting "Mar 2017" As Date Variable


We have a microstrategy report that we all use to pull some historical data to turn into a pivot table in excel. There is a month attribute that comes up as "Jan 2017", "Feb 2017"... etc. The problem is, when you export the data and create a pivot table and you are trying to group data by this month attribute, Excel doesn't recognize "Jan 2017" as January 2017, but as a string. Thus, when you try to sort by the month attribute, excel sorts it alphabetically.

The question is, how can we get excel to understand "Mar 2017" is supposed to stand for March 2017?


Solution

  • In another column put this formula:

    =--("1 " & A2)
    

    Where A2 is the start of your "Dates". Then copy the formula down.

    Then copy and paste the values over your "dates".

    Format the cells as mmm yyyy.

    Now they are true dates and can be grouped by month on the pivot tables.