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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

DAX HELP

I want to calculate current Fiscal Year End Date (April - March)

Suppose for Today, Fiscal year end date should be 31-03-2021
1 ACCEPTED SOLUTION

@Anonymous 

 

Hi, try with this calculated column:

CurrentEndFiscalYear =
IF (
    MONTH ( 'Table'[Date] ) <= 3;
    DATE ( YEAR ( 'Table'[Date] ); 03; 31 );
    DATE ( YEAR ( 'Table'[Date] ) + 1; 03; 31 )
)

 

Regards

 

Victor

 




Lima - Peru

View solution in original post

6 REPLIES 6
Greg_Deckler
Super User
Super User

That's really not a lot to go on. See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...


Follow on LinkedIn
@ 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!:
The Definitive Guide to Power Query (M)

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

Not a pro in dax. Can you please help on this. I tried formulas , but getting wrong data.

I am not clear on what you want. Are you saying that you want to have a "total ytd" measure that runs from April 1st, 2019 to March 31st, 2020 for example? If so, perhaps something like:

 

Measure =
  VAR __Date = MAX([Date])
  VAR __Year = YEAR(__Date)
  VAR __FiscalEndMonth = 3
  VAR __FiscalEndDay = 31
  VAR __FiscalBeginMonth = 4
  VAR __FiscalBeginDay = 1
  VAR __FiscalBegin = DATE(__Year - 1,__FiscalBeginMonth,__FiscalBeginDay)
  VAR __FiscalEnd = DATE(__Year, __FiscalEndMonth,__FiscalEndDay)
RETURN
  SUMX(FILTER('Table',[Date] >= __FiscalBegin && [Date] <= __FiscalEnd),[Column])

Follow on LinkedIn
@ 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!:
The Definitive Guide to Power Query (M)

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

No sir.

Suppose my report date is today, Then I want to add one more column which contains current fiscal year end date (31-03-2021)
 
REPORTDATECURRFISCALYEAREND
09-01-201531-03-2015
09-05-201531-03-2016
 

@Anonymous 

 

Hi, try with this calculated column:

CurrentEndFiscalYear =
IF (
    MONTH ( 'Table'[Date] ) <= 3;
    DATE ( YEAR ( 'Table'[Date] ); 03; 31 );
    DATE ( YEAR ( 'Table'[Date] ) + 1; 03; 31 )
)

 

Regards

 

Victor

 




Lima - Peru
Anonymous
Not applicable

Thanks bro, it worked.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors