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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Syndicate_Admin
Administrator
Administrator

#Date error conditional column

Hello everyone

I am creating a conditional column, where if the value of a column has a certain value (texttype), then bring the date I indicate, but it does not load the output type date and the error comes out #date

manuelacardonan_0-1680112224867.png

1 REPLY 1
PhilipTreacy
Super User
Super User

Hi @Syndicate_Admin  @manuelacardonan 

 

Your logic looks correct.  Is the issue that the new column isn't set as date type?

 

You can just add a Change Type step, but if you wan to do it when the new column is created, you'll need to manually edit the M code.

 

You need to add another argument to end of the Table.AddColumn function type date 

 

= Table.AddColumn(#"Changed Type1", "Custom", each if [AnoColPaquete] = "202391" then #date(2023,3,6) else null, type date)

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

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