PreviousPeriods for current year

Hello,
I using a PreviousPeriods to sum target in my sales department report. Problem is when I choose 2020 in Time filter, my function summs also targets from 2019. How to change this function to display only values for current choosed year

SUM 
(
  {
  PreviousPeriods([Time].CurrentHierarchyMember.FirstChild),
  [Time].CurrentHierarchyMember
  },
  [Measures].[Sale Plan with expected]
)

Hi @Tomasz_Bryla
Welcome to the eazyBI community!

Function PreviousPeriods() always includes all the previous periods form the first member of Time dimension until the selected one.

In your case, I suggest trying standard calculation “'Cumulative sum” instead: click on the column header “Planowane”, select Add calculated --> Cumulative sum, and a new column “Cumulative Planowane” with the cumulative sum of Planowane values, calculated across all displayed columns, appears.
Read here: https://docs.eazybi.com/display/EAZYBI/Create+reports#Createreports-Addstandardcalculationsbasedonaselectedmeasure

See example with cumulative Isaues created:

Hope, it could be a solution for you!

Best,
Ilze, support@eazybi.com