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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
HWhitee
New Member

Error in Date time format as input is "-"

Hi all,

 

I'm looking to draw on your collective knowledge for an issue i'm experiencing. I've tried to find a solution in the forums, but havent found yet, so logging it myself.

 

I'm drawing logistical ETA timestamps which I then convert into a details to understand when it will be delivered. However, sometimes we have no ETA available and the underlying report provides a "-". Now my PBI is saying that all the lines with "-" have an error as the dash cannot be converted into a date.

 

Please help.

 

HWhitee_0-1708615176863.pngHWhitee_1-1708615191967.png

 

I'm not an expert with PBI, so any help is welcome. 

1 ACCEPTED SOLUTION

@HWhitee,

 

In my example, the data type was Text before applying the Replace Values step. Upstream in your Power Query script, find the step that sets the data type for that column and change it to Text.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
HWhitee
New Member

Hi DataInsights,

 

I have the following step already in place:

= Table.SelectRows(#"Changed Type", each ([Legacy Record ID] <> null and [Legacy Record ID] <> "" and [Legacy Record ID] <> "-"))

HWhitee_0-1708675058774.png

 

Without success.

 

Additionally, when i try to use the 'replace values' function, and select to find "-" and replace with null, I get the message "enter a DateTime value", see screenshot below.

HWhitee_1-1708675174785.png

Thank you for thinking along.

 

 

@HWhitee,

 

In my example, the data type was Text before applying the Replace Values step. Upstream in your Power Query script, find the step that sets the data type for that column and change it to Text.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




That was it, brilliant, thank you!

DataInsights
Super User
Super User

@HWhitee,

 

In Power Query, add a step that replaces "-" with null. After this step, you should be able to convert the column to a DateTime value.

 

DataInsights_0-1708620838092.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.