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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
hcze
Helper II
Helper II

Help with calendar

Hi, I have a baffling issue creating column Month (see the screenshot) where the date column will change to the next month.

 

Without adding column Month - table values are correct

hcze_0-1721301664256.png

 

 

Add Month column - the date column is wrong

hcze_1-1721301717710.png

 

Any hints are appreciated.

 

Thanks.

 

1 ACCEPTED SOLUTION
v-nuoc-msft
Community Support
Community Support

Hi @hcze 

 

@bhanu_gautam Thank you very much for your prompt reply, please allow me to share some content here.

 

I made changes to your code:

 

CalendarMe = 
ADDCOLUMNS(
    CALENDAR(DATE(2024,1,1), DATE(2025,12,31)),
    "Year", FORMAT(YEAR([Date]), "0000"),
    "Month Number", FORMAT(MONTH([Date]), "00"),
    "Day", FORMAT(DAY([Date]), "00"),
    "Month", FORMAT([Date], "mmmm")
)

 

Here is the result.

 

vnuocmsft_0-1721639806017.png

 

Regards,

Nono Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-nuoc-msft
Community Support
Community Support

Hi @hcze 

 

@bhanu_gautam Thank you very much for your prompt reply, please allow me to share some content here.

 

I made changes to your code:

 

CalendarMe = 
ADDCOLUMNS(
    CALENDAR(DATE(2024,1,1), DATE(2025,12,31)),
    "Year", FORMAT(YEAR([Date]), "0000"),
    "Month Number", FORMAT(MONTH([Date]), "00"),
    "Day", FORMAT(DAY([Date]), "00"),
    "Month", FORMAT([Date], "mmmm")
)

 

Here is the result.

 

vnuocmsft_0-1721639806017.png

 

Regards,

Nono Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

bhanu_gautam
Super User
Super User

@hcze , Use the below DAX

 

CalendarTable =
ADDCOLUMNS(
CALENDAR(DATE(2024, 1, 1), DATE(2025, 12, 31)),
"Year", YEAR([Date]),
"Month Number", MONTH([Date]),
"Day", DAY([Date]),
"Month", FORMAT([Date], "MMMM")
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Thanks! It does not make sense that the sequence could cause that issue.

@hcze , the issue seems with format function remove 00 then try




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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