Forum Discussion
Anonymous
4 years agoNot applicable
Custom date column using quarters
I am trying to create a custom column which will display "Past" , "Present", and "Future" based on criteria below. Current quarter today (7-19-22) is Q3 Past = before last Quarter ( Q1 22, Q4 ...
- 4 years ago
Hi Anonymous
You can add a custom column with the following code
if [Date] < Date.AddQuarters(Date.StartOfQuarter(Date.From(DateTime.LocalNow())),-1) then "Past" else if [Date] < Date.AddQuarters(Date.StartOfQuarter(Date.From(DateTime.LocalNow())),4) then "Present" else "Future"Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
v-jingzhang
Community Support
4 years agoHi Anonymous
You can add a custom column with the following code
if [Date] < Date.AddQuarters(Date.StartOfQuarter(Date.From(DateTime.LocalNow())),-1) then "Past" else if [Date] < Date.AddQuarters(Date.StartOfQuarter(Date.From(DateTime.LocalNow())),4) then "Present" else "Future"
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.