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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
judddonnelly
Regular Visitor

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 @judddonnelly 
Create this Calculated column:
Date= DATE(YEAR(Y), MONTH(M), DAY(D))

 

Mark it as a solution if it answers your question.

Thanks!

 

judddonnelly_2-1627483805956.png

 

judddonnelly_0-1627483629693.png

 

judddonnelly_1-1627483784303.png

 

@judddonnelly ,

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
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.