Forum Discussion
Creating a column based off current year values with 3yr/5yr indicators
- 5 years ago
Hello Anonymous
add a new column with this formula for 3 years
if [yrColumn] >= Date.Year(Date.AddYears(DateTime.FixedLocalNow(),-3)) then true else falsethis is the result
add another column where you put -5 instead of -3.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Hello Anonymous
and why are you not adding two column... one calles Is3Year and the oth Is5Year and filling it with true or false?
what is the scope of this conditional columns?
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
- Anonymous5 years agoNot applicable
Thanks Jimmy801 for the suggestion.
That is another great alternative that may work better. Can you help with the M code to signify a 3 or 5yr T/F?- Jimmy8015 years agoCommunity Champion
Hello Anonymous
add a new column with this formula for 3 years
if [yrColumn] >= Date.Year(Date.AddYears(DateTime.FixedLocalNow(),-3)) then true else falsethis is the result
add another column where you put -5 instead of -3.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy- Anonymous5 years agoNot applicable
Thank you Jimmy801 I can make this work from here!