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
Anonymous
Not applicable

Return FYTD date range with lookup to fiscal year for current day

I have a calendar table with fields Date, Year(Calendar), and Year(Fiscal). I need a measure that will return the date range logic as follows, but I can't figure out the proper syntax. It needs to be able to be used as a filter on my calendar table.

 

Dates between:  

   Min(Calendar[Date] where Year(Fiscal) = same Year(Fiscal) as today)    and

   Calendar[Date] = today()

 

So if the start of FY = July 1, the date range it would return is 7/1/2020 - 5/6/2021. Thoughts for as compact of dax as possible?

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , If you have a calendar with all dates

 

var _1 = startofyear([Date],6/30)

var _2 = today()

 

or try like

new column =
var _mon = month(today())
var _year = if(_mon <=6 , year([Date]) -1, [Year])
return
date(_year,7,1)

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.

Top Solution Authors