Forum Discussion
arp2
1 year agoHelper II
Custom Fiscal Year error
I have a simple model in Power BI with two tables. I have a custom Fiscal Year Calendar Table which is Date Table. The FY starts in July and ends in June. The week starts on Saturday and ends on Frid...
- 1 year ago
arp2 - this will work for last week:
VAR LastWeekStart = SELECTEDVALUE ( FYCalendar[WeekStart] ) - 7 VAR LastWeekEnd = SELECTEDVALUE ( FYCalendar[WeekEnding] ) - 7 RETURN CALCULATE ( DISTINCTCOUNT ( MasterProjListR02[Project Number] ), REMOVEFILTERS ( FYCalendar ), MasterProjListR02[Project Creation Date] >= LastWeekStart, MasterProjListR02[Project Creation Date] <= LastWeekEnd )and your measure for YTD will already work:
see attached file
If I answered your question please mark my post as the solution, it helps others with the same challenge find the answer!
mark_endicott
1 year agoSuper User
arp2 - this will work for last week:
VAR LastWeekStart =
SELECTEDVALUE ( FYCalendar[WeekStart] ) - 7
VAR LastWeekEnd =
SELECTEDVALUE ( FYCalendar[WeekEnding] ) - 7
RETURN
CALCULATE (
DISTINCTCOUNT ( MasterProjListR02[Project Number] ),
REMOVEFILTERS ( FYCalendar ),
MasterProjListR02[Project Creation Date] >= LastWeekStart,
MasterProjListR02[Project Creation Date] <= LastWeekEnd
)
and your measure for YTD will already work:
see attached file
If I answered your question please mark my post as the solution, it helps others with the same challenge find the answer!
arp2
1 year agoHelper II
mark_endicott This is extremely helpful. Thank you for your support. Good Day!