Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

YTD last year

Hi everybody,

 

I calculate a YTD and i try to compute The total YTD for the last year but it's give me a wrong value, it show me the total of the previous year:

 

Net TO YTD = TOTALYTD(SUM('QUERY MONTHLY RESULTS PBI'[Net turnover (OC)]); DATESYTD('Calendar'[Date]))

 

Net TO YTD Y-1 = CALCULATE([Net TO YTD];SAMEPERIODLASTYEAR('Calendar'[Date]))
 
How can i fix this? Can someone help me with this?
 
Thanks!
 
Best regards,
  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi BhaveshPatel,

     

    I slice by month an by Year and also change my Expression to calculate "Total Net TO of Last Year" by putting a new filter in my CALCULATE Function to keep the expression doing the right calcul, because by slicing the value change.

     

    Best regards,

  • Hi Anonymous 

     

    If you believe this answers your question, Please mark it as accepted solution so it can be helpful to others as well

6 Replies

  •  

    Hi Anonymous 

     

    You can use something like this:

     

     

    [Prev Yr YTD] =

    CALCULATE(SUM('QUERY MONTHLY RESULTS PBI'[Net turnover (OC)]), DATEADD(DATESYTD(Calendar[Date]),-1,Year))

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi BhaveshPatel ,

       

      Thanks for your reply!

      I try what you suggest me but it's give me the same value as before.

      The value is equal to Tatal of previous Year.

       

      Best regards,

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi BhaveshPatel,

       

      Thanks for your reply!

      I try what you suggest me but it's give me the same value as before.

      The value is equal to Tatal of previous Year.

       

      Best regards,