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
sjoshi
Helper II
Helper II

How to get previous year total for current not matter what date is selected in date slicer by user

Hello,

 

I'm using below expression for calculating prior year end but below expression gives me previous year total for the year which is entered in slicer by the user. I want below expression to return always previous year for today's/current date not for the date selected in slicer. Our fiscal year starts from 1 July

 

CheckPriorYearYTD = CALCULATE([Check],DATESYTD(DATEADD('Time Dim'[Date],-1,YEAR),"6/30")) 

 

EX: Today we enter Slicer date as 01/02/2015 then above expression giving total of FY 2014 but it should give me total of FY 2018 as current date is 09/11/2018 , FY 2019 Q1

 

Let me know if you need any more details

 

Thanks

Smita

1 REPLY 1
v-cherch-msft
Employee
Employee

Hi @sjoshi

 

You may try to use TOTALYTD Function. Here is the reference for you. If it is not your case, please share some data sample and expected output. You can upload it to OneDrive or Dropbox and post the link here.

 

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.