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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

DAX for Last Year End (Fiscal Year)

Dear All,

     Could anyone please let me find a way to obtain the Last Year End from the current year selection. We are using Fiscal Year for our calculation. Our Fiscal year starts in JULY and ends in JUNE

 

For example,

Fiscal Year start is 1st July, 2016

Fiscal Year End is 30th June, 2017

 

We are in need of getting the Last Year End, for example,

 

if we select August 2016 then we need to have the result as June 2016.

since our Fiscal year spans from JULY to JUNE. 

 

Selected Year: August 2016   means Required Last Year End: JUNE 2016

Selected Year: JUNE 2016      means Required Last Year End: JUNE 2015

 

We request you to kindly provide us the way to calculate this using DAX expression

 

Thanks and Regards, 

Praveen 

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

Hi@ praveenkumarv

You can try to use this measure asbelow:

Measure = IF(MONTH(MAX('Date'[Date]))>6,"June " & YEAR(MAX('Date'[Date])),"June " & (YEAR(MAX('Date'[Date]))-1))

Result:

15.png16.png

Best Regards,

Lin

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

View solution in original post

6 REPLIES 6
v-lili6-msft
Community Support
Community Support

Hi@ praveenkumarv

You can try to use this measure asbelow:

Measure = IF(MONTH(MAX('Date'[Date]))>6,"June " & YEAR(MAX('Date'[Date])),"June " & (YEAR(MAX('Date'[Date]))-1))

Result:

15.png16.png

Best Regards,

Lin

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

Hi there,

Great DAX to get the last year end date. Could someone please help me in getting the value of this particular year end date.

For example, I have sales data for many years, when I use Calculate and try to filter only last year end date, what the DAX will be?

Thanks heaps.

Anonymous
Not applicable

@v-lili6-msft  This is a good answer, thank you!

 
Anonymous
Not applicable

Thank you for replying to my question. I can use this expression in my report. 

 

Praveen. 

Greg_Deckler
Super User
Super User

Last Year End = "June " & YEAR(MAX([SelectedDate]))-1

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490. Sample data would help.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thank you very much for your response. 

 

Praveen

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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