Forum Discussion
dgkallan
Helper II
2 years agoIF two dates in the same month, but different dates
I'm working with HR data. I will have a Run Date, which will typically be the first of the month. Then, I will have another date, such as Termination Date in that file which could be any date (if t...
- 2 years ago
=if Date.ToText([File Run Date],"yyyyMM")=Date.ToText([Termination Date],"yyyyMM") then 1 else 0
dgkallan
Helper II
2 years agowdx223_Daniel or anyone else for that matter,
I realized one flaw in my design. I actually need to match up the File Run Date with the Termination Date for when the Termination was in the previous month. So, in easy speak (File Run Date) month - 1 month = Termination Date month
wdx223_Daniel
Community Champion
2 years ago=if Date.ToText(Date.AddMonths([File Run Date],-1),"yyyyMM")=Date.ToText([Termination Date],"yyyyMM") then 1 else 0