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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Jane689
Helper I
Helper I

how to make DATEADD function work with fiscal calendar

how do i modify below dax formula to give me correct result for fiscal calendar which starts from Feb and ends in JAN

 

last month sales = Calculate(sum(sales),DATEADD(Date['fisc_month'],-1,MONTH)

 

Above formula when used gives me last month sales for FY23 Feb = sales for FY23 Jan which is wrong

1 REPLY 1
Greg_Deckler
Super User
Super User

@Jane689 Most DAX Time "Intelligence" functions are brain dead regarding fiscal calendars. There are multiple ways of accomplishing this but generally the best approach is a good fiscal calendar table. Something with offsets like what Melissa de Korte has put together. Extended Date Table (Power Query M function) - Power Query / M Code Showcase - Enterprise DNA Forum

 

Also, maybe some of this will help: You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000

Also, 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...


@ 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...

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.