Forum Discussion
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,
Omar_204 somthing like:
Table = ADDCOLUMNS( SELECTCOLUMNS( SourceTable, "Date", SourceTable[YourDateTime Column] ), "Month", MONTH([Date]), "Month Name", FORMAT([Date], "mmmm"), "Year", Year([Date]) )
In case it answered your question, please accept the solution to help other members find it. Appreciate Your Kudos.Showcase Report – Contoso By SpartaBI
Visit SpartaBI website Visit SpartaBI Linkdin Visit SpartaBI Facebook
SpartaBI Logo
3 Replies
- SpartaBI
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]) )
In case it answered your question, please accept the solution to help other members find it. Appreciate Your Kudos.Showcase Report – Contoso By SpartaBI
Visit SpartaBI website Visit SpartaBI Linkdin Visit SpartaBI Facebook
SpartaBI Logo