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
yasemsem
Frequent Visitor

Identify Current Fiscal Year and Last Fiscal Year and return it as a single value

I want to create a measure that return current fiscal year and last fiscal year
I have the a table with fiscal calendar with column "FY" identifying the fiscal year of each date.

Fiscal Year usually start by end of Jan or beg of Feb.

Tried to create a measure which didn't accept column references. 
 
Created a new column, which return the "FY" if date.month =april(as example it could be any other month past Feb to make sure it is current FY and if Date.Year=now() . BUT it only returns the Current fiscal year of month April. I thought when I put it in a Var it will be returned a single value to be used in other calculations like Y/Y growth.

This Fiscal Year =
Var CFY=IF(YEAR(NOW())='Fiscal Calendar'[Calendar Date].[Year] && 'Fiscal Calendar'[Calendar Date].[Month]="April",'Fiscal Calendar'[FY])
return IF('Fiscal Calendar'[FY]=CFY,'Fiscal Calendar'[FY])

Attached PBI file
1 ACCEPTED SOLUTION
yasemsem
Frequent Visitor

Hello,

 

This was solved using lookupvalue. For some reason it was not working before and I tried again and now it is working

Current Fiscal Year  = lookupvalue('Table'[Fiscal Year], 'Table'[Calendar Date], Today())

Last Fiscal Year = lookupvalue('Table'[Fiscal Year], 'Table'[Calendar Date], Today()) - 1

View solution in original post

4 REPLIES 4
yasemsem
Frequent Visitor

Hello,

 

This was solved using lookupvalue. For some reason it was not working before and I tried again and now it is working

Current Fiscal Year  = lookupvalue('Table'[Fiscal Year], 'Table'[Calendar Date], Today())

Last Fiscal Year = lookupvalue('Table'[Fiscal Year], 'Table'[Calendar Date], Today()) - 1

v-xinruzhu-msft
Community Support
Community Support

Hi @yasemsem 

Do you mean that if the current date is in February or January, the last fiscal year is returned, and if after February and the year is current, this fiscal year is returned?

 

Best Regards!

Yolo Zhu

 

Thank you Yolo Zhu

Not really. What I mean is that the fiscal year dates are dynamic.. it can end for example by 31st Jan or by 4th of Feb.

 

So what I need is a measure to identify current fiscal year based on the "Fiscal Calendar" table in the PBI file uploaded to below drive link:

 
The table has the dates and the equivalent Fiscal Year(FY) for this Date.
 
 
What I tried to do before is to know the fiscal year from anytime after Feb because I dont really know when the fiscal year will start as we said it is dynamix. Accordingly I set it to be taken from April as an example. But it did not work.

I hope this clarifies.

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.