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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Issue with Totals with Fiscal Year

Having some issue with my Totals. Something simple that i am missing out. 

 

Need to get the 3 totals based on fiscal Year which starts May 1st. I had my measures as below. But i am not getting totals by the sites for some reason. 

Year To date totals

cytd Total = TOTALYTD([Total Amount],'Calendar'[Date],"04/30")

Last Year Totals 

Last Year Total = TOTALYTD([Total Amount],SAMEPERIODLASTYEAR('Calendar'[Date]),"04/30")

Current Year Total -  

CY Total Amount = sum('Fact'[Amount]). 
 
Need to get the Last Year Totals & Current Year totals to be able to slice based on the period selection. My understanding is TOTALYTD will get the totals upto the period selected on slicer. 
 
But i want to get the LAst Year Total & Current Year Totals based on the selected Period. In other words if i select only 1, 2 & 3 it should be totals for first 3 periods for the year and last year same period. 
 
 
Attached is the model 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

As checked your file, the data type of field Date in fact table be set as Text, so it should be the cause that can't get the total values. Please select Date field and navigate to Column tools ribbon to set the data type of Date field as "Date" just as below screenshot:

TotalYTD.JPG

Best Regards

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous ,

As checked your file, the data type of field Date in fact table be set as Text, so it should be the cause that can't get the total values. Please select Date field and navigate to Column tools ribbon to set the data type of Date field as "Date" just as below screenshot:

TotalYTD.JPG

Best Regards

Anonymous
Not applicable

Thanks @Anonymous . Super. I should've caught that. 

amitchandak
Super User
Super User

@Anonymous , Try like

 

Last YTD Sales = CALCULATE([Total Amount],DATESYTD(dateadd('Date'[Date],-1,Year),"4/30"))

 

You can add custom period and add that to slicer

refer my calndar Creating Financial Calendar - From Any Month
https://community.powerbi.com/t5/Community-Blog/Creating-Financial-Calendar-Decoding-Date-and-Calendar-1-5-Power/ba-p/1187441

 

example

YTD= CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Year]=max('Date'[Year]) && 'Date'[Period] <= Max('Date'[Period]) ))
LYTD = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Year]=max('Date'[Year])-1 && 'Date'[Period] <= Max('Date'[Period])))

 

Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA

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
Anonymous
Not applicable

Thanks @amitchandak .  I will try those measures. is that a right statement, that For the current year, i don't need a filter checking max date even if fiscal year starts 05/01  

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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