Forum Discussion
jcastr02
Post Prodigy
5 years agoPower query if formula
Can you help with a formula that would do the following in power query: 1. If the "Term Date" is blank then (Today()-HireDate) If not blank 2. TermDate-HireDate Appreciate any hel...
- 5 years ago
= Table.AddColumn(PreviousStepName, "Days", each if [TermDate]=null then Duration.Days(Date.From(DateTime.LocalNow())-[HireDate]) else Duration.Days([TermDate]-[HireDate]), Int64.Type)It is assumed that [TermDate] & [HireDate] columns are of type date.
Jakinta
Solution Sage
5 years ago= Table.AddColumn(PreviousStepName, "Days", each if [TermDate]=null then Duration.Days(Date.From(DateTime.LocalNow())-[HireDate]) else Duration.Days([TermDate]-[HireDate]), Int64.Type)It is assumed that [TermDate] & [HireDate] columns are of type date.