Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

format Month doesn't work

Hello teams,

I use "Month(Now()) to get the current month and I get "11" for this month. But I want to convert number to character (Novemeber instead of 11)

I use  Current = FORMAT(MONTH(NOW()), "MMMM") But the result returns January, which is wrong.
How to I have a correct format?
Thank you
 
1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@Anonymous 

Give this a try

 

 

Current = FORMAT(NOW(), "MMMM")

 

 

The problem you are running into is the way DAX (and excel and SQL etc.) think of dates.  

NOW() is really 43784 which is the numeric value of 11/15/2019.

When you say MONTH(NOW()) you are getting 11 which DAX reads as the date 1/11/1900 so it formats "MMMM" as January.

 

If this solves your issues please mark it as the solution. Kudos 👍 are nice too.

 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

Try

Month(Now()) & ""

Current = FORMAT(MONTH(NOW()), "MM")

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

jdbuchanan71
Super User
Super User

@Anonymous 

Give this a try

 

 

Current = FORMAT(NOW(), "MMMM")

 

 

The problem you are running into is the way DAX (and excel and SQL etc.) think of dates.  

NOW() is really 43784 which is the numeric value of 11/15/2019.

When you say MONTH(NOW()) you are getting 11 which DAX reads as the date 1/11/1900 so it formats "MMMM" as January.

 

If this solves your issues please mark it as the solution. Kudos 👍 are nice too.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.