Forum Discussion

andyspa's avatar
andyspa
Icon for Helper I rankHelper I
5 years ago
Solved

Weekly value vs. last year andf vs. last week

Hello, I have a file as follow: 3 different columns (year, week, and values).   I want the tool to display W10 value, % W10 2021 vs. W10 2020, % W10 2021 vs. W9 2021.   I tried something like: ...
  • andyspa's avatar
    5 years ago

    hello amitchandak  sayaliredij , thanks for your reply.

     

    At the end i solved it as follow:

     

    CW = IF(AND(Associates[Week]=WEEKNUM(TODAY())-2,Associates[Year]=YEAR(TODAY())), Associates[Values2],0)
    LW = IF(AND(Associates[Week]=WEEKNUM(TODAY())-3,Associates[Year]=YEAR(TODAY())), Associates[Values2],0)
    CWLY = IF(AND(Associates[Week]=WEEKNUM(TODAY())-2,Associates[Year]=YEAR(TODAY())-1), Associates[Values2],0)
    CW vs. LW = SUM(Associates[Temps CW])/SUM(Associates[Temps LW])-1
    CW vs. LY = SUM(Associates[Temps CW])/SUM(Associates[Temps CWLY])-1