Forum Discussion
Power Query - Create new column based on latest date in two other columns
Hi,
I want to create a new column in Power Query with the latest date found in the below mentioned two columns. The column on the right might have Null values. If so, the date in the left column should be used.
if [Start_date__c] >= [Opportunity History.First Signature Date] then [Start_date__c] else if [Opportunity History.First Signature Date] = "null" then [Start_date__c] else [Opportunity History.First Signature Date]
I've managed a simple IF/THEN/ELSE formula. But, it doesn't take in to account the null values.
Thank you!
Hi again ,
try to add a condition in the begin to check if the signature date is null
someting like that:
if
[Opportunity History.First Signature Date] = null
then [Start_date__c]
else
if
[Start_date__c] >= [Opportunity History.First Signature Date]
then [Start_date__c]
else
if
[Opportunity History.First Signature Date] = "null"
then [Start_date__c]
else
[Opportunity History.First Signature Date]Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! ;-
Best Regards
BC
9 Replies
- onurbmiguel_Power Participant
- Anders_GHelper I
By row.
I've managed an if formula that gives me the correct values, but it fails with the null values.
if [Start_date__c] >= [Opportunity History.First Signature Date] then [Start_date__c] else if [Opportunity History.First Signature Date] = "null" then [Start_date__c] else [Opportunity History.First Signature Date]
- onurbmiguel_Power Participant
Hi again ,
try to add a condition in the begin to check if the signature date is null
someting like that:
if
[Opportunity History.First Signature Date] = null
then [Start_date__c]
else
if
[Start_date__c] >= [Opportunity History.First Signature Date]
then [Start_date__c]
else
if
[Opportunity History.First Signature Date] = "null"
then [Start_date__c]
else
[Opportunity History.First Signature Date]Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! ;-
Best Regards
BC
- Anders_GHelper I
That will give the Start Date column only when Opportunity History is null right? The date is not always the latest in the Opportunity History column.
I've created a if/then/else formula for a custome column but it fails to take in to consideration the null values.
if [Start_date__c] >= [Opportunity History.First Signature Date] then [Start_date__c] else if [Opportunity History.First Signature Date] = "null" then [Start_date__c] else [Opportunity History.First Signature Date]- davehusMemorable Member