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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Chriswyy
Frequent Visitor

DAX to get Month() and format() as "MMMM"

Dear guys,

 

I just started to learn Power BI and try to make a calendar table using DAX.

Everything is fine at the beginning, however when I try to format the month as "MMMM", it returns only December and January.

 

Anything wrong with my DAX input ??

 

Calendar().pngMonth().png

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@Chriswyy 

Try it like this.

Month_MMM = FORMAT([Date],"MMMM")

 

View solution in original post

5 REPLIES 5
jdbuchanan71
Super User
Super User

Are there maybe spaces on the end of the ones that are not returning a value? Instead of "30 days" it is "30 days "?

Add a column that is just the LEN.  They should all be 7.

 

Length = LEN ( Coursera__Inventory[RestockingFrequency] )

 

jdbuchanan71
Super User
Super User

Just read the days at the beginning of the sring and add that to the LastRestocked like this.

 

Next Restock = 
VAR _Days = LEFT (
            Coursera__Inventory[RestockingFrequency],
            FIND ( " ", Coursera__Inventory[RestockingFrequency] ) - 1
        )
RETURN 
CONVERT ( Coursera__Inventory[LastRestocked] + _Days, DATETIME )

jdbuchanan71_0-1693536994762.png

 

 

I can understand the way of your doing, but whats wrong with my input ??

I wanna explore as much DAX as possible, because i'm current learning.

 

Based on the nested ifs, by right the DAX should return me a value for each row,

but why some rows are NULL, even if the logical test is True

Chriswyy
Frequent Visitor

@jdbuchanan71 

Sry, I have another question again. Also about date.

Something wrong with my nested if ??

 

Dateadd().png

 

 

jdbuchanan71
Super User
Super User

@Chriswyy 

Try it like this.

Month_MMM = FORMAT([Date],"MMMM")

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.