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
Anonymous
Not applicable

how to separate dates from a column which also text in it

I am having an issue with the DAX formula for separating the dates and removing the text. I have a column A which has dates as well as text. I need to keep only dates and remove the text. If I use this formula = Table.AddColumn(Source, "Date", each if [RequestCompletionDate] = "1/22/2020" then [RequestCompletionDate] else "") then it works for the specific date but not sure what to do extract all dates. Below is a sample example of my data.

 

A
Complete
HUB234
01/22/2020
xyzxkaed
05/08/2021

 

Any help is appreciated.

 

2 REPLIES 2
Anonymous
Not applicable

I got my answer. This is what I used to extract my dates from a column

Using Power Query to Extract Dates from Text String - YouTube

daxer-almighty
Solution Sage
Solution Sage

First, this is not DAX but M, the language of Power Query. Second, you can use a function that casts a string into a date and then filter out the rows where this casting returns an error. Look for a function like Date.FromText... or something similar.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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