Forum Discussion

RAdams's avatar
RAdams
Helper III
3 years ago

Previous Year Weekend Measure Not Summing Correctly

I know this is a known issue but I just can't get my Previous Year Weekend Measure to Sum Correctly in my matrix table. I know I'm missing somethign small but just can't figure it out. Any help would be appreciated! 

 

LY-W = 
VAR getdate = MAX ( 'DSR'[InvoiceDate] )
VAR wot = WEEKNUM (getdate,1)
VAR ly = YEAR (getdate)-1
RETURN
        SUMX(
            VALUES('Calendar'[PY Weekend]),
            CALCULATE(SUM('DSR'[TotalSale]),
        FILTER (
            ALL ( 'Calendar' ),
            WEEKNUM('Calendar'[Date],1) = wot
                && Year('Calendar'[Date]) = ly
        )
    ))

 

No RepliesBe the first to reply