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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Omar_204
Helper I
Helper I

Create new Table which extracts Date/Time column from an existing table and add new columns

Hello Community,

 

I am new to PowerBI and currently, I am trying to create a new table using DAX query to extract only one field (Date/Time) into the table. Then I want to create new columns for month and year (based on the date/time field).

 

Is there a simple solution to this ?

 

Thank you.

 

Regards,

1 ACCEPTED SOLUTION
SpartaBI
Community Champion
Community Champion

@Omar_204 somthing like:

 

 

Table = 
ADDCOLUMNS(
	SELECTCOLUMNS(
		SourceTable,
		"Date", SourceTable[YourDateTime Column]
	),
	"Month", MONTH([Date]),
        "Month Name", FORMAT([Date], "mmmm"),
	"Year", Year([Date])
)

 

 

 


2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png

Showcase Report – Contoso By SpartaBI


SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Full-Logo11.png

View solution in original post

3 REPLIES 3
Omar_204
Helper I
Helper I

Thanks @SpartaBI .

 

This created a new table with exactly what I was looking for, except the month is showing as a number.

 

How can I make this the Month name ?

@Omar_204 I added it in the original repsonse now. 
Please don't forget to mark that as a solution and appreciate your kudos 🙂

SpartaBI
Community Champion
Community Champion

@Omar_204 somthing like:

 

 

Table = 
ADDCOLUMNS(
	SELECTCOLUMNS(
		SourceTable,
		"Date", SourceTable[YourDateTime Column]
	),
	"Month", MONTH([Date]),
        "Month Name", FORMAT([Date], "mmmm"),
	"Year", Year([Date])
)

 

 

 


2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png

Showcase Report – Contoso By SpartaBI


SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Full-Logo11.png

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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