Forum Discussion
What's wrong with excel data model Month function malfunctioning
- Oct 02, 2021
That could mean you have texts which looks like date, not dates (aka numbers). Please check in Format, is it
or
https://social.technet.microsoft.com/wiki/contents/articles/1018.powerpivot-grouping-by-dates-months-quarters-years-etc-in-pivottables.aspx
I only tried to explain why
=FORMAT( 1, "mmmm")
in DAX returns December, not January.
Actually you need to use another field as Subodh_Tiwari_sktneer suggested.
- Yea_SoOct 01, 2021Bronze Contributor
At first it was as what as @Subodh_Tiwari_sktneer suggested because I'd rather get the translation directly from the original value/date and it was December that's why I tried doing a go between as you can see in the image, just to make sure I wasn't dreaming up things.
- SergeiBaklanOct 02, 2021Diamond Contributor
Sorry, I missed. Your question is
"What's wrong with excel data model Month function malfunctioning"
The answer is - nothing is wrong with the function, it returns what it shall to return. We may only guess you expect to receive month name of the date, not month name of the month number. If so, instead of
=FORMAT( s1ay[Month], "mmmm" )
it shall be
=FORMAT( s1ay[Week of:], "mmmm" )
- Yea_SoOct 02, 2021Bronze Contributor
Like I've said to everyone over and over again. That is where I started:
It started here: =MONTH([Week of:])was my initial formula
I saw it returned December
so I thought wow 1/7/2021 is returning a December with Month([Week of:]) formula
then I thought let me try doing it a different way:
Which is the one you see in the image.
Is that clear enough for everyone including some new reader to the post?Here's a file from June 2021:
as you can see the time stamp I created that solution in June of 2021
now I'm showing what I did in the columns except the last one column I put the formula:
FORMAT(MONTH(RMDS[PayDate])),"mmmm") and look what month was returned?
"December" and what is the date in the first column? 1/1/2010
So you can't say I made it up or my application of the formula is incorrect something is up with excel you can tell the world 1/1/2010 returns a December because [what ever the reason here]
so let's scroll down and see if that reason holds...
Oh look all of the dates in January are returning a December and all the dates in February are returning a January ...
so now tell me what could the reason be?