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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Custom column Date.from dataset values

I have 3 columns in my dataset that represent Year, Month and Day.  They are call Y, M, D respectice and are all text values.  Trying to create a custome column that return a date from these.  Tried Date.From(#date([Y],[M],[D])) but getting an error.

6 REPLIES 6
CNENFRNL
Community Champion
Community Champion

= Table.AddColumn(Source, "date", each Date.From(Text.Combine(Record.ToList(_), "/")))

Screenshot 2021-07-29 024537.png

 

= Table.AddColumn(Source, "Date", each #date(Number.From([Y]),Number.From([M]),Number.From([D])))

Screenshot 2021-07-29 024657.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Tanushree_Kapse
Impactful Individual
Impactful Individual

Hi @Anonymous 
Create this Calculated column:
Date= DATE(YEAR(Y), MONTH(M), DAY(D))

 

Mark it as a solution if it answers your question.

Thanks!

 

Anonymous
Not applicable

judddonnelly_2-1627483805956.png

 

Anonymous
Not applicable

judddonnelly_0-1627483629693.png

 

Anonymous
Not applicable

judddonnelly_1-1627483784303.png

 

@Anonymous ,

Not in the power query.

Create a calculated column...in your table in the data view.

Write the DAX for the column.

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.