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.
Hi Experts
I have a Date Table with all the correct columns including Week Start and Week End Date and Week Rank in my date Table. I am trying to work YTD from 1 April 2023 to the last sunday which is 25th Feb 24 then next week the calculcation becomes 01 April 2023 to last sunday current year (03 rd march 24) and so on...
PS cannot upload a file due to data - Sorry
@blestone111 , Try a measure like
FYTD =
var _max1 = if(isfiltered('Date'),MAXx( allselected('Date'), 'Date'[Date]) , today())
var _min = if( Month(_max1) <4 , date(year(_max1)-1,4,1) ,date(year(_max1),4,1)), //FY April -March
var _max = _max1 -WeekDay(_max1) +1 //Last sunday
return
CALCULATE([Your Measure] ,Filter(('Date'[Date]),'Date'[Date]>= _min && 'Date'[Date] <= _max))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
94 | |
75 | |
63 | |
62 |
User | Count |
---|---|
137 | |
105 | |
104 | |
80 | |
63 |