Forum Discussion

ImPalaBI's avatar
ImPalaBI
Helper I
6 years ago
Solved

Week continuity between years

Hi! I have week to week comparison in a formula. It was working fine until week 52. Now that we changed year, I should compare week 1, to week 52. But I cant figure out how to do it. Im not using ...
  • v-lionel-msft's avatar
    v-lionel-msft
    6 years ago

    Hi ImPalaBI ,

    I created  a calculated column like this:

    Column = 
    VAR x = COUNT(Sheet3[Semana]) + 1
    RETURN
    CALCULATE(
        SUM(Sheet3[Stock]),
        FILTER(
            Sheet3,
            Sheet3[Semana] = 5-EARLIER(Sheet3[Semana])
        )
    )

     

    Best regards,
    Lionel Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.