The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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?
@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)
User | Count |
---|---|
15 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
23 | |
14 | |
13 | |
8 | |
8 |