Forum Discussion

MarcoT's avatar
MarcoT
Frequent Visitor
4 years ago
Solved

SAMEPERIODLASTYEAR not working on previous year

Hi, I'm pretty new to PowerBI and I appreciate this forum to share experiences. I've a problem with a measure not displaying the correct value. I've a fact table called Summary in which I've the fie...
  • tamerj1's avatar
    tamerj1
    4 years ago

    MarcoT 

    For Week in Year Number make sure tgat you select "Do not summarize" also make sure that 'Calendar' is marked as date table with Date Value as the date column. Then the following should technically work. 

    Deliberated Lines TOT Previous Year =
    CALCULATE (
        'Summary'[Deliberated Lines TOT],
        ALL ( 'Calendar' ),
        SAMEPERIODLASTYEAR ( 'Calendar'[Date Value] )
    )