try this code :
Rev SWLY2 = VAR _weekid52 = MAX ( DateTable[WeekID] ) - 52 RETURN SUMX ( VALUES ( DateTable[WeekEnding] ), CALCULATE ( SUM ( 'Fact Table'[Revenue Net] ), FILTER ( ALL ( DateTable ), DateTable[WeekID] = _weekid52 ) )
@mcornfield SELECTEDVALUE only return a single value and at the grand total there are no filters so you have to use MAX or MIN like this:
Rev = VAR MaxDate = CALCULATE ( MAX ( DateTable[WeekID] ), FILTER ( VALUES ( Dates[Calendar Year Number] ), [Revenue Net] <> 0 ) ) VAR Result = CALCULATE ( [Revenue Net], DateTable[WeekID] = MaxDate - 10, REMOVEFILTERS ( DateTable ) ) RETURN Result
try this formula
Rev SWLY2 = var _weekid52 = SELECTEDVALUE(DateTable[WeekID]) - 52 return CALCULATE(SUM('Fact Table'[Revenue Net]), FILTER(ALL(DateTable), DateTable[WeekID] =_weekid52 ))
Hi @mcornfield , you need use SUMX and Summarize in another measure.
Check out the News & Announcements to learn more.
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
Microsoft received the highest score of any vendor in both the strategy and current offering categories.
DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.