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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Analytics4Life1
Regular Visitor

How to combine month and year columns into MM-YYYY

Hello,

 

I am still very new to Power BI and was playing around with some sample data today.

 

I have a Year column in YYYY format, and Date Number column (1= January, 12 = December). 

 

Could someone help me with the formula I would use to combine these two columns to get a MM-YYYY date column?

 

Thanks!

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

Hi @Analytics4Life1 ,

 

Would you please try the following calculated column:

 

Date = FORMAT(DATE('Table'[YERR],'Table'[Month],1),"MM-YYYY") 

 

Capture3.PNG

 

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

 

Best Regards,

Dedmon Dai

View solution in original post

5 REPLIES 5
Syndicate_Admin
Administrator
Administrator

Hello, and if additional to that I would like to add a day even if this table does not exist. How could I do it?

v-deddai1-msft
Community Support
Community Support

Hi @Analytics4Life1 ,

 

Would you please try the following calculated column:

 

Date = FORMAT(DATE('Table'[YERR],'Table'[Month],1),"MM-YYYY") 

 

Capture3.PNG

 

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

 

Best Regards,

Dedmon Dai

What if the Month column is not numbers but names of the months??

Thanks for the above information.

But how can I combine Date, Month, Year at the same time?

 

I am getting error while doing.

 

Please help!

amitchandak
Super User
Super User

@Analytics4Life1 , You need year and month for this . Assume both are in number format

 

format(Date([year],[month],1),"MM-YYYY") //where year and month are columns

 

format([Date],"MM-YYYY") //Date is a column

 

format(today(),"MM-YYYY")

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.