Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
PowerWhy
Helper IV
Helper IV

Prior year only display numbers for ytd periods

Hello,

 

I have a table with current year and prior year columns. I have been asked to make the prior year column only display periods that we have in the current year (so that the total is year-to-date for both current year and prior year). Please can you tell me how to do this? The pbix file is at https://www.dropbox.com/s/10g30fzutd3m2z4/Test%20-%20only%20show%20YTD%20periods%20of%20prior%20fisc... 

 

(sorry I should have mocked this up for an incomplete quarter, but if this was a Fiscal Period 5 report then the Q2 total should be Period 4 + Period 5 (and ignore Period 6) for both current year and prior year)

 

PowerWhy_0-1674821350979.png

PY Amount = calculate(sum(Actuals[Amount]),
    'Calendar'[Fiscal Year] = SELECTEDVALUE('Calendar'[Fiscal Year]) - 1
)

 

Thank you for your help,

 

PW

1 REPLY 1
amitchandak
Super User
Super User

@PowerWhy , You need to have a measure like

 

calculate(sum(Actuals[Amount]), Dateadd('Calendar'[Date],  - 1, year)
)

 

Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.