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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
safifaruqi
Helper I
Helper I

Fiscal Year YTD Calculations

Hi Guys, 

 

This is probably very rudimentary, but I am trying to calculate YTD total revenue, based on my fiscal year, (May-April) 

 

I have created the following measure to calculate

 

 

YTDLY_Revenue = CALCULATE([YTD_Revenue],SAMEPERIODLASTYEAR('Dimension Period'[Date]))
 
What I do not get is the output I am getting: The output is working as expected, except I am not getting any YTD value for the FY 2021-2022, where as the prior years are being populated correctly.  
 
Lastly, looking at the YTDLY_Revenue measure output, I am getting the output against all years. 
 
 
safifaruqi_0-1629212993551.png
I cant seem to figure out the issue. 
 
when I change the measure to include an end of the year date

YTD = 

TOTALYTD([Total_Revenue],'Dimension Period'[Date]) , "4/30") 
 
Then I get the following output
safifaruqi_1-1629213528733.png

 

 

Thank for you the help!

 
2 REPLIES 2
amitchandak
Super User
Super User

@safifaruqi , what is wrong with last table is not very clear, Just make sure you have all there required dates in

Dimension Period table and it is marked as date table

 

YTD =
TOTALYTD([Total_Revenue],'Dimension Period'[Date]) , "4/30")

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

@amitchandak 

 

Thanks for your reply amit, I used your blog to create a FISCAL YEAR Calendar WEEK SORT, 

 

The objective is to simply calculate YTD and YTD LY  on a fiscal year basis, for comparison purposes. 

 

safifaruqi_0-1629218575182.png

 

 

When yousing the Fiscal Year Tags (FY Column highlighted in yellow in screen grab above) I get blanks for YTD measure I created against the current FY 2021-2022, but not for rest. 

 

Sample output based on Fiscal year tags :

 

safifaruqi_1-1629218813209.png

 

Sample output based on calendar year and months, which is correct and as expected :

 

safifaruqi_2-1629219392971.png

 

measures : 

YTD_Revenue = CALCULATE(TOTALYTD([Total_Revenue],'Dimension Period'[Date]))
Total_Revenue = [Total_CreditNote]+[Total_Invoice]

 

I think my FY Tags are throwing of the YTD measure. Any help and best practice guidance will be super useful! 

 

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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