Forum Discussion
MarcoT
4 years agoFrequent Visitor
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...
- 4 years ago
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] ) )
tamerj1
Community Champion
4 years agoHi MarcoT
In your table visual, Instead of Planned Delivery Date please use 'Calendar'[Date] and instead of Week Planned Delivery Date use 'Calender'[Week Number]
MarcoT
4 years agoFrequent Visitor
Hi, I've done it but now but unfortunately it shows no results. Here's a screenshot:
- tamerj14 years ago
Community Champion
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] ) )