Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Creating a column based off current year values with 3yr/5yr indicators

Hello all, I've been stuck on this problem for a day now and I'm looking for some input. I am very new to M language and I'm trying to make what I think is a simple column with it, essentially using ...
  • Jimmy801's avatar
    Jimmy801
    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 false

    this 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