cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Data4920 Visitor
Visitor

Add current date to a new column when another value is updated

Hi!

I have a list of devices with multiple attributes that I track in a table where I'm trying to insert the current date once a certain column is updated in that table.  For example, when the [Status] column value changes from any value to 'Completed', I want a new custom column [Completion Date] to populate the current date for that particular item only as a static value.  I'm not sure if I need to create a new filtered table first for all blank records in the new [Completion Date] field then run an If/Then statement to check for the conditions first?  Any help would be appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Add current date to a new column when another value is updated

Hi @Data4920 ,

You could achieve your achievement with creating a custom column like below.

= Table.AddColumn(#"Changed Type1", "Custom", each if [Status] = "Complete" then DateTime.LocalNow() else [Status])

Here is my test output.

Capture.PNG

If you still need help, please share some data sample and your desired output so that we could help further on it.

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 REPLY 1
Community Support Team
Community Support Team

Re: Add current date to a new column when another value is updated

Hi @Data4920 ,

You could achieve your achievement with creating a custom column like below.

= Table.AddColumn(#"Changed Type1", "Custom", each if [Status] = "Complete" then DateTime.LocalNow() else [Status])

Here is my test output.

Capture.PNG

If you still need help, please share some data sample and your desired output so that we could help further on it.

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 110 members 1,654 guests
Please welcome our newest community members: