Forum Discussion

NewbieJono's avatar
NewbieJono
Icon for Post Partisan rankPost Partisan
4 years ago
Solved

Comparison To same period last Year

Hello i am comparing some volumes to the same period last year by month. This works fine. but for current month last year i would like it to only inlcude up to current date this month. At the moment it shows total so far this month but it comapres it to the total of febuary 2021.

 

 

Here is the dax i curently use for previous year

 

 

Mail Received PY = 
CALCULATE(
    SUM('FACT - Mail Receipts'[Volume]),   
    SAMEPERIODLASTYEAR('DIM - Date Table'[Date])
)

 

 

  • NewbieJono , Try if this can help

    Mail Received PY =
    CALCULATE(
    SUM('FACT - Mail Receipts'[Volume]),
    SAMEPERIODLASTYEAR('DIM - Date Table'[Date]), 'DIM - Date Table'[Date] <= date(year(today()), month(today())-12, day(today()))
    )

2 Replies