1 of 1 people found this helpful
Try this? -
IF [Test Date]>=[Start_Date] and
ELSEIF [Year]=DATEPART('year',[Test Date]) and
DATETRUNC('month', [Test Date]) =DATETRUNC('month',[Start_Date]) and
[Test Date]>=[Start_Date] and [Test Date]>[End_Date]
Then STR( DATEADD('month',1,[Start_Date])) END
Please find my solution attached as well as below sample result for your reference.
Basically I think what you want to achieve is to get the first match period if the test date falls into two or more periods, so I did another test for 20 of April 2018
Hope this helps
exDateIntervall_v10.2.twbx 38.6 KB
Thanks for your effort. I needed always the next interval where the current date fits in. But it was already solved in the post above.
Thanks that's exactly the function I was looking for.