TOTALYTD for prior Year in Power Pivot Excel

Arafat, Yeasin 1 Reputation point
2022-11-20T11:56:39.047+00:00

Hi,

Need help calculating Prior Year TOTALYTD.

I am able to calculate the current year TOTALYTD but for the prior year it's not coming as like the current year TOTALYTD it's giving prior year single month total.

262050-image.png

using this for current year --- YTD_SHIP_CY:=TOTALYTD([SHIPMENT_GROSS],DATESYTD('Calendar'[Date]))

Tried this for Prior year --- YTD_SHIP_PY:=CALCULATE([SHIPMENT_GROSS],SAMEPERIODLASTYEAR('Calendar'[Date])) Or PREVIOUSYEAR

Both formulas give the same result not giving YTD Total.

Someone, please help me.

Thanks
Yeasin Arafat

Microsoft 365 and Office | Development | Other
Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Herbert Seidenberg 1,196 Reputation points
    2022-11-20T16:33:01.817+00:00

  2. Arafat, Yeasin 1 Reputation point
    2022-12-01T10:24:10.473+00:00

    Any one please help me with this? Thanks in advance

    0 comments No comments

  3. Ashish Mathur 99,575 Reputation points Volunteer Moderator
    2025-07-27T02:07:13.1266667+00:00

    Hi,

    Write this measure

    YTD_SHIP_PY:=CALCULATE([YTD_SHIP_CY],SAMEPERIODLASTYEAR('Calendar'[Date]))
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.